zeek/testing/scripts/diff-remove-file-ids
Jon Siwek 22bf3e1196 Increase UIDs to 96 bits w/ C/F prefix - BIT-1016
- The bit-length is adjustable via redef'ing bits_per_uid.

- Prefix 'C' is used for connection UIDS (including IP tunnels) and
  'F' for files.
2013-08-26 15:36:31 -05:00

33 lines
498 B
Awk
Executable file

#! /usr/bin/awk -f
#
# A diff canonifier that removes all file IDs from files.log
BEGIN {
FS="\t";
OFS="\t";
process = 0;
}
$1 == "#path" && $2 == "files" {
process = 1;
}
process && column1 > 0 && column2 > 0 {
$column1 = "XXXXXXXXXXX";
$column2 = "XXXXXXXXXXX";
}
/^#/ {
for ( i = 0; i < NF; ++i ) {
if ( $i == "fuid" )
column1 = i - 1;
if ( $i == "parent_fuid" )
column2 = i - 1;
}
}
{ print }