Remove extraction counter in default file extraction scripts.

This commit is contained in:
Jon Siwek 2013-05-21 11:12:00 -05:00
parent 16f924c2c0
commit 28f51a9a22
20 changed files with 24 additions and 53 deletions

View file

@ -3,10 +3,10 @@
# @TEST-EXEC: bro -r $TRACES/ftp/ipv4.trace %INPUT
# @TEST-EXEC: btest-diff conn.log
# @TEST-EXEC: btest-diff ftp.log
# @TEST-EXEC: btest-diff ftp-item-Rqjkzoroau4-0.dat
# @TEST-EXEC: btest-diff ftp-item-BTsa70Ua9x7-1.dat
# @TEST-EXEC: btest-diff ftp-item-VLQvJybrm38-2.dat
# @TEST-EXEC: btest-diff ftp-item-zrfwSs9K1yk-3.dat
# @TEST-EXEC: btest-diff ftp-item-Rqjkzoroau4.dat
# @TEST-EXEC: btest-diff ftp-item-BTsa70Ua9x7.dat
# @TEST-EXEC: btest-diff ftp-item-VLQvJybrm38.dat
# @TEST-EXEC: btest-diff ftp-item-zrfwSs9K1yk.dat
redef FTP::logged_commands += {"LIST"};
redef FTP::extract_file_types=/.*/;

View file

@ -1,5 +1,5 @@
# @TEST-EXEC: bro -C -r $TRACES/web.trace %INPUT
# @TEST-EXEC: btest-diff http.log
# @TEST-EXEC: btest-diff http-item-BFymS6bFgT3-0.dat
# @TEST-EXEC: btest-diff http-item-BFymS6bFgT3.dat
redef HTTP::extract_file_types += /text\/html/;

View file

@ -1,26 +1,10 @@
# This tests that the contents of a DCC transfer negotiated with IRC can be
# correctly extracted. The mime type of the file transferred is normalized
# to prevent sensitivity to libmagic version being used.
# correctly extracted.
# @TEST-EXEC: bro -r $TRACES/irc-dcc-send.trace %INPUT
# @TEST-EXEC: btest-diff irc.log
# @TEST-EXEC: btest-diff irc-dcc-item-wqKMAamJVSb-0.dat
# @TEST-EXEC: btest-diff irc-dcc-item-wqKMAamJVSb.dat
# @TEST-EXEC: bro -r $TRACES/irc-dcc-send.trace %INPUT IRC::extraction_prefix="test"
# @TEST-EXEC: test -e test-wqKMAamJVSb-0.dat
# @TEST-EXEC: test -e test-wqKMAamJVSb.dat
redef IRC::extract_file_types=/.*/;
event bro_init()
{
Log::remove_default_filter(IRC::LOG);
Log::add_filter(IRC::LOG, [$name="normalized-mime-types",
$pred=function(rec: IRC::Info): bool
{
if ( rec?$dcc_mime_type )
{
rec$dcc_mime_type = "FAKE_MIME";
}
return T;
}
]);
}

View file

@ -1,10 +1,10 @@
# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT
# @TEST-EXEC: btest-diff smtp_entities.log
# @TEST-EXEC: btest-diff smtp-entity-cwR7l6Zctxb-0.dat
# @TEST-EXEC: btest-diff smtp-entity-Ltd7QO7jEv3-1.dat
# @TEST-EXEC: btest-diff smtp-entity-cwR7l6Zctxb.dat
# @TEST-EXEC: btest-diff smtp-entity-Ltd7QO7jEv3.dat
# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT SMTP::extraction_prefix="test"
# @TEST-EXEC: test -e test-cwR7l6Zctxb-0.dat
# @TEST-EXEC: test -e test-Ltd7QO7jEv3-1.dat
# @TEST-EXEC: test -e test-cwR7l6Zctxb.dat
# @TEST-EXEC: test -e test-Ltd7QO7jEv3.dat
@load base/protocols/smtp