mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix a bug in diff-remove-x509-names canonifier
The last field in a log was being ignored, due to an off-by-one error in a "for" loop. Also simplified the script by combining two patterns into one.
This commit is contained in:
parent
6df54a3168
commit
b1d1d90de4
1 changed files with 21 additions and 20 deletions
|
@ -5,8 +5,10 @@
|
|||
|
||||
BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1; is_col = -1; cs_col = -1; ci_col = -1; cert_subj_col = -1; cert_issuer_col = -1 }
|
||||
|
||||
/^#fields/ {
|
||||
for ( i = 2; i < NF; ++i )
|
||||
/^#/ {
|
||||
if ( $1 == "#fields" )
|
||||
{
|
||||
for ( i = 2; i <= NF; ++i )
|
||||
{
|
||||
if ( $i == "subject" )
|
||||
s_col = i-1;
|
||||
|
@ -25,7 +27,6 @@ BEGIN { FS="\t"; OFS="\t"; s_col = -1; i_col = -1; is_col = -1; cs_col = -1; ci_
|
|||
}
|
||||
}
|
||||
|
||||
/^#/ {
|
||||
print;
|
||||
next;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue