Merge remote-tracking branch 'origin/topic/seth/zeek_init'

* origin/topic/seth/zeek_init:
  Some more testing fixes.
  Update docs and tests for bro_(init|done) -> zeek_(init|done)
  Implement the zeek_init handler.
This commit is contained in:
Jon Siwek 2019-04-19 11:16:35 -07:00
commit a994be9eeb
628 changed files with 868 additions and 1082 deletions

View file

@ -35,7 +35,7 @@ function test_request(label: string, req: ActiveHTTP::Request)
}
}
event bro_init()
event zeek_init()
{
test_request("test1", [$url="127.0.0.1:32123"]);
test_request("test2", [$url="127.0.0.1:32123/empty", $method="POST"]);

View file

@ -3,7 +3,7 @@
@load base/utils/addrs
event bro_init()
event zeek_init()
{
local ip = "0.0.0.0";

View file

@ -10,7 +10,7 @@ function dc(s: string)
print "";
}
event bro_init()
event zeek_init()
{
dc("https://www.bro.org:42/documentation/faq.html?k1=v1&k2=v2");
dc("");

View file

@ -47,7 +47,7 @@ function new_file(fname: string)
terminate();
}
event bro_init()
event zeek_init()
{
Dir::monitor("../testdir", new_file, .25sec);
}

View file

@ -40,7 +40,7 @@ function test_dir(id: conn_id, d: Direction, expect: bool)
result == expect ? "SUCCESS" : "FAIL");
}
event bro_init()
event zeek_init()
{
test_host(local_ip, LOCAL_HOSTS, T);
test_host(local_ip, REMOTE_HOSTS, F);

View file

@ -26,7 +26,7 @@ function test_cmd(label: string, cmd: Exec::Command)
}
}
event bro_init()
event zeek_init()
{
test_cmd("test1", [$cmd="bash ../somescript.sh",
$read_files=set("out1", "out2")]);

View file

@ -12,9 +12,9 @@ event connection_established(c: connection)
print generate_extraction_filename("", c, "");
}
event bro_init()
event zeek_init()
{
print extract_filename_from_content_disposition("attachment; filename=Economy");
print extract_filename_from_content_disposition("attachment; name=\"US-$ rates\"");
print extract_filename_from_content_disposition("attachment; filename*=iso-8859-1'en'%A3%20rates");
}
}

View file

@ -16,7 +16,7 @@ type myrec2: record {
m: myrec1 &log;
};
event bro_init()
event zeek_init()
{
# #####################################
# Test the basic (non-container) types:

View file

@ -4,7 +4,7 @@
# This is loaded by default
@load base/utils/queue
event bro_init()
event zeek_init()
{
local q = Queue::init([$max_len=2]);
Queue::put(q, 1);
@ -30,4 +30,4 @@ event bro_init()
Queue::get_vector(q2, test3);
for ( i in test3 )
print fmt("String queue value: %s", test3[i]);
}
}

View file

@ -12,7 +12,7 @@ redef Site::local_admins += {
[141.142.100.0/24] = b,
};
event bro_init()
event zeek_init()
{
print Site::get_emails(141.142.1.1);
print Site::get_emails(141.142.100.100);