mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
Additional test output canonification for ds2txt's timestamps.
This commit is contained in:
parent
08593c5147
commit
91a3ce9518
5 changed files with 19 additions and 13 deletions
|
@ -31,11 +31,11 @@ extent offset ExtentType
|
||||||
604 DataSeries: ExtentIndex
|
604 DataSeries: ExtentIndex
|
||||||
# Extent, type='ssh'
|
# Extent, type='ssh'
|
||||||
t id.orig_h id.orig_p id.resp_h id.resp_p status country
|
t id.orig_h id.orig_p id.resp_h id.resp_p status country
|
||||||
1.334e+09 1.2.3.4 1234 2.3.4.5 80 success unknown
|
X.XXXe+09 1.2.3.4 1234 2.3.4.5 80 success unknown
|
||||||
1.334e+09 1.2.3.4 1234 2.3.4.5 80 failure US
|
X.XXXe+09 1.2.3.4 1234 2.3.4.5 80 failure US
|
||||||
1.334e+09 1.2.3.4 1234 2.3.4.5 80 failure UK
|
X.XXXe+09 1.2.3.4 1234 2.3.4.5 80 failure UK
|
||||||
1.334e+09 1.2.3.4 1234 2.3.4.5 80 success BR
|
X.XXXe+09 1.2.3.4 1234 2.3.4.5 80 success BR
|
||||||
1.334e+09 1.2.3.4 1234 2.3.4.5 80 failure MX
|
X.XXXe+09 1.2.3.4 1234 2.3.4.5 80 failure MX
|
||||||
# Extent, type='DataSeries: ExtentIndex'
|
# Extent, type='DataSeries: ExtentIndex'
|
||||||
offset extenttype
|
offset extenttype
|
||||||
40 DataSeries: XmlType
|
40 DataSeries: XmlType
|
||||||
|
|
|
@ -55,18 +55,18 @@
|
||||||
<!-- info_code : count -->
|
<!-- info_code : count -->
|
||||||
<!-- info_msg : string -->
|
<!-- info_msg : string -->
|
||||||
<!-- filename : string -->
|
<!-- filename : string -->
|
||||||
<!-- tags : table -->
|
<!-- tags : table[enum] -->
|
||||||
<!-- username : string -->
|
<!-- username : string -->
|
||||||
<!-- password : string -->
|
<!-- password : string -->
|
||||||
<!-- proxied : table -->
|
<!-- proxied : table[string] -->
|
||||||
<!-- mime_type : string -->
|
<!-- mime_type : string -->
|
||||||
<!-- md5 : string -->
|
<!-- md5 : string -->
|
||||||
<!-- extraction_file : file -->
|
<!-- extraction_file : file -->
|
||||||
|
|
||||||
extent offset ExtentType
|
extent offset ExtentType
|
||||||
40 DataSeries: XmlType
|
40 DataSeries: XmlType
|
||||||
756 http
|
768 http
|
||||||
1144 DataSeries: ExtentIndex
|
1156 DataSeries: ExtentIndex
|
||||||
# Extent, type='http'
|
# Extent, type='http'
|
||||||
ts uid id.orig_h id.orig_p id.resp_h id.resp_p trans_depth method host uri referrer user_agent request_body_len response_body_len status_code status_msg info_code info_msg filename tags username password proxied mime_type md5 extraction_file
|
ts uid id.orig_h id.orig_p id.resp_h id.resp_p trans_depth method host uri referrer user_agent request_body_len response_body_len status_code status_msg info_code info_msg filename tags username password proxied mime_type md5 extraction_file
|
||||||
1.3e+09 j4u32Pc5bif 141.142.220.118 48649 208.80.152.118 80 0 0 0 304 Not Modified 0
|
1.3e+09 j4u32Pc5bif 141.142.220.118 48649 208.80.152.118 80 0 0 0 304 Not Modified 0
|
||||||
|
@ -86,5 +86,5 @@ ts uid id.orig_h id.orig_p id.resp_h id.resp_p trans_depth method host uri refer
|
||||||
# Extent, type='DataSeries: ExtentIndex'
|
# Extent, type='DataSeries: ExtentIndex'
|
||||||
offset extenttype
|
offset extenttype
|
||||||
40 DataSeries: XmlType
|
40 DataSeries: XmlType
|
||||||
756 http
|
768 http
|
||||||
1144 DataSeries: ExtentIndex
|
1156 DataSeries: ExtentIndex
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# @TEST-REQUIRES: has-writer DataSeries && which ds2txt
|
# @TEST-REQUIRES: has-writer DataSeries && which ds2txt
|
||||||
#
|
#
|
||||||
# @TEST-EXEC: bro -b %INPUT Log::default_writer=Log::WRITER_DATASERIES
|
# @TEST-EXEC: bro -b %INPUT Log::default_writer=Log::WRITER_DATASERIES
|
||||||
# @TEST-EXEC: ds2txt ssh.ds >ssh.ds.txt
|
# @TEST-EXEC: ds2txt ssh.ds | ${SCRIPTS}/diff-remove-timestamps-dataseries >ssh.ds.txt
|
||||||
# @TEST-EXEC: btest-diff ssh.ds.txt
|
# @TEST-EXEC: btest-diff ssh.ds.txt
|
||||||
|
|
||||||
module SSH;
|
module SSH;
|
||||||
|
|
2
testing/external/subdir-btest.cfg
vendored
2
testing/external/subdir-btest.cfg
vendored
|
@ -10,7 +10,7 @@ BROPATH=`bash -c %(testbase)s/../../../build/bro-path-dev`:%(testbase)s/../scrip
|
||||||
BRO_SEED_FILE=%(testbase)s/../random.seed
|
BRO_SEED_FILE=%(testbase)s/../random.seed
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
PATH=%(testbase)s/../../../build/src:%(testbase)s/../../../aux/btest:%(default_path)s
|
PATH=%(testbase)s/../../../build/src:%(testbase)s/../../../aux/btest:%(testbase)s/../../scripts:%(default_path)s
|
||||||
TEST_DIFF_CANONIFIER=%(testbase)s/../../scripts/diff-canonifier-external
|
TEST_DIFF_CANONIFIER=%(testbase)s/../../scripts/diff-canonifier-external
|
||||||
TEST_DIFF_BRIEF=1
|
TEST_DIFF_BRIEF=1
|
||||||
TRACES=%(testbase)s/Traces
|
TRACES=%(testbase)s/Traces
|
||||||
|
|
6
testing/scripts/diff-remove-timestamps-dataseries
Executable file
6
testing/scripts/diff-remove-timestamps-dataseries
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Replace anything which looks like DataSeries timestamps (which is a double) with XXXs.
|
||||||
|
|
||||||
|
sed 's/1\.[0-9]*e+09/X.XXXe+09/g'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue