mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
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:
commit
a994be9eeb
628 changed files with 868 additions and 1082 deletions
|
@ -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"]);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@load base/utils/addrs
|
||||
|
||||
event bro_init()
|
||||
event zeek_init()
|
||||
{
|
||||
local ip = "0.0.0.0";
|
||||
|
||||
|
|
|
@ -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("");
|
||||
|
|
|
@ -47,7 +47,7 @@ function new_file(fname: string)
|
|||
terminate();
|
||||
}
|
||||
|
||||
event bro_init()
|
||||
event zeek_init()
|
||||
{
|
||||
Dir::monitor("../testdir", new_file, .25sec);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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")]);
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ type myrec2: record {
|
|||
m: myrec1 &log;
|
||||
};
|
||||
|
||||
event bro_init()
|
||||
event zeek_init()
|
||||
{
|
||||
# #####################################
|
||||
# Test the basic (non-container) types:
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue