Merge remote-tracking branch 'origin/master' into fastpath

This commit is contained in:
Daniel Thayer 2016-04-29 01:30:25 -05:00
commit 428be70190
75 changed files with 2288 additions and 952 deletions

View file

@ -30,12 +30,21 @@ hello
42.0
180.0
Broker::BOOL
***************************
{
two,
one,
three
}
{
[two] = 2,
[one] = 1,
[three] = 3
}
[zero, one, two]
[a=<uninitialized>, b=bee, c=1]
[a=test, b=bee, c=1]
[a=test, b=testagain, c=1]
***************************
0
T
1
@ -43,19 +52,20 @@ T
F
T
2
F
2
T
1
F
{
bye
}
T
0
***************************
{
[two] = 2,
[one] = 1,
[three] = 3
}
***************************
0
[d=<uninitialized>]
1
@ -69,8 +79,14 @@ F
37
[d=broker::data{42}]
1
[d=<uninitialized>]
1
T
0
{
}
***************************
[zero, one, two]
0
T
T
@ -85,10 +101,10 @@ T
[d=broker::data{bah}]
[hi, salutations, greetings]
3
T
0
[]
***************************
[a=<uninitialized>, b=bee, c=1]
[a=test, b=bee, c=1]
[a=test, b=testagain, c=1]
3
T
T
@ -97,3 +113,6 @@ T
[d=broker::data{hello}]
[d=broker::data{37}]
3
T
3
[d=broker::data{goodbye}]

View file

@ -30,12 +30,21 @@ hello
42.0
180.0
Broker::BOOL
***************************
{
two,
one,
three
}
{
[two] = 2,
[one] = 1,
[three] = 3
}
[zero, one, two]
[a=<uninitialized>, b=bee, c=1]
[a=test, b=bee, c=1]
[a=test, b=testagain, c=1]
***************************
0
T
1
@ -43,19 +52,20 @@ T
F
T
2
F
2
T
1
F
{
bye
}
T
0
***************************
{
[two] = 2,
[one] = 1,
[three] = 3
}
***************************
0
[d=<uninitialized>]
1
@ -69,8 +79,14 @@ F
37
[d=broker::data{42}]
1
[d=<uninitialized>]
1
T
0
{
}
***************************
[zero, one, two]
0
T
T
@ -85,10 +101,10 @@ T
[d=broker::data{bah}]
[hi, salutations, greetings]
3
T
0
[]
***************************
[a=<uninitialized>, b=bee, c=1]
[a=test, b=bee, c=1]
[a=test, b=testagain, c=1]
3
T
T
@ -97,3 +113,6 @@ T
[d=broker::data{hello}]
[d=broker::data{37}]
3
T
3
[d=broker::data{goodbye}]

View file

@ -1,5 +1,6 @@
2 1080
1 137
1 143
1 1434
1 161
1 162
@ -47,8 +48,8 @@
1 992
1 993
1 995
54 and
53 or
54 port
36 tcp
55 and
54 or
55 port
37 tcp
18 udp

View file

@ -3,7 +3,7 @@
#empty_field (empty)
#unset_field -
#path loaded_scripts
#open 2016-04-22-23-21-01
#open 2016-04-26-18-11-39
#fields name
#types string
scripts/base/init-bare.bro
@ -17,7 +17,11 @@ scripts/base/init-bare.bro
build/scripts/base/bif/event.bif.bro
scripts/base/frameworks/broker/__load__.bro
scripts/base/frameworks/broker/main.bro
build/scripts/base/bif/comm.bif.bro
build/scripts/base/bif/messaging.bif.bro
scripts/base/frameworks/broker/store.bro
build/scripts/base/bif/data.bif.bro
build/scripts/base/bif/store.bif.bro
scripts/base/frameworks/logging/__load__.bro
scripts/base/frameworks/logging/main.bro
build/scripts/base/bif/logging.bif.bro
@ -51,10 +55,6 @@ scripts/base/init-bare.bro
build/scripts/base/bif/bloom-filter.bif.bro
build/scripts/base/bif/cardinality-counter.bif.bro
build/scripts/base/bif/top-k.bif.bro
build/scripts/base/bif/comm.bif.bro
build/scripts/base/bif/data.bif.bro
build/scripts/base/bif/messaging.bif.bro
build/scripts/base/bif/store.bif.bro
build/scripts/base/bif/plugins/__load__.bro
build/scripts/base/bif/plugins/Bro_ARP.events.bif.bro
build/scripts/base/bif/plugins/Bro_AYIYA.events.bif.bro
@ -76,6 +76,7 @@ scripts/base/init-bare.bro
build/scripts/base/bif/plugins/Bro_HTTP.functions.bif.bro
build/scripts/base/bif/plugins/Bro_ICMP.events.bif.bro
build/scripts/base/bif/plugins/Bro_Ident.events.bif.bro
build/scripts/base/bif/plugins/Bro_IMAP.events.bif.bro
build/scripts/base/bif/plugins/Bro_InterConn.events.bif.bro
build/scripts/base/bif/plugins/Bro_IRC.events.bif.bro
build/scripts/base/bif/plugins/Bro_KRB.events.bif.bro
@ -131,4 +132,4 @@ scripts/base/init-bare.bro
build/scripts/base/bif/plugins/Bro_SQLiteWriter.sqlite.bif.bro
scripts/policy/misc/loaded-scripts.bro
scripts/base/utils/paths.bro
#close 2016-04-22-23-21-01
#close 2016-04-26-18-11-39

View file

@ -3,7 +3,7 @@
#empty_field (empty)
#unset_field -
#path loaded_scripts
#open 2016-04-22-23-21-18
#open 2016-04-26-18-11-49
#fields name
#types string
scripts/base/init-bare.bro
@ -17,7 +17,11 @@ scripts/base/init-bare.bro
build/scripts/base/bif/event.bif.bro
scripts/base/frameworks/broker/__load__.bro
scripts/base/frameworks/broker/main.bro
build/scripts/base/bif/comm.bif.bro
build/scripts/base/bif/messaging.bif.bro
scripts/base/frameworks/broker/store.bro
build/scripts/base/bif/data.bif.bro
build/scripts/base/bif/store.bif.bro
scripts/base/frameworks/logging/__load__.bro
scripts/base/frameworks/logging/main.bro
build/scripts/base/bif/logging.bif.bro
@ -51,10 +55,6 @@ scripts/base/init-bare.bro
build/scripts/base/bif/bloom-filter.bif.bro
build/scripts/base/bif/cardinality-counter.bif.bro
build/scripts/base/bif/top-k.bif.bro
build/scripts/base/bif/comm.bif.bro
build/scripts/base/bif/data.bif.bro
build/scripts/base/bif/messaging.bif.bro
build/scripts/base/bif/store.bif.bro
build/scripts/base/bif/plugins/__load__.bro
build/scripts/base/bif/plugins/Bro_ARP.events.bif.bro
build/scripts/base/bif/plugins/Bro_AYIYA.events.bif.bro
@ -76,6 +76,7 @@ scripts/base/init-bare.bro
build/scripts/base/bif/plugins/Bro_HTTP.functions.bif.bro
build/scripts/base/bif/plugins/Bro_ICMP.events.bif.bro
build/scripts/base/bif/plugins/Bro_Ident.events.bif.bro
build/scripts/base/bif/plugins/Bro_IMAP.events.bif.bro
build/scripts/base/bif/plugins/Bro_InterConn.events.bif.bro
build/scripts/base/bif/plugins/Bro_IRC.events.bif.bro
build/scripts/base/bif/plugins/Bro_KRB.events.bif.bro
@ -252,6 +253,8 @@ scripts/base/init-default.bro
scripts/base/protocols/http/entities.bro
scripts/base/protocols/http/utils.bro
scripts/base/protocols/http/files.bro
scripts/base/protocols/imap/__load__.bro
scripts/base/protocols/imap/main.bro
scripts/base/protocols/irc/__load__.bro
scripts/base/protocols/irc/main.bro
scripts/base/protocols/irc/dcc-send.bro
@ -302,4 +305,4 @@ scripts/base/init-default.bro
scripts/base/misc/find-checksum-offloading.bro
scripts/base/misc/find-filtered-trace.bro
scripts/policy/misc/loaded-scripts.bro
#close 2016-04-22-23-21-18
#close 2016-04-26-18-11-49

View file

@ -21,11 +21,11 @@ event Broker::outgoing_connection_established(peer_address: string,
{
print "Broker::outgoing_connection_established",
peer_address, peer_port, peer_name;
Broker::event("bro/event/my_event", Broker::event_args(my_event, "hi", 0));
Broker::send_event("bro/event/my_event", Broker::event_args(my_event, "hi", 0));
event my_auto_event("stuff", 88);
Broker::event("bro/event/my_event", Broker::event_args(my_event, "...", 1));
Broker::send_event("bro/event/my_event", Broker::event_args(my_event, "...", 1));
event my_auto_event("more stuff", 51);
Broker::event("bro/event/my_event", Broker::event_args(my_event, "bye", 2));
Broker::send_event("bro/event/my_event", Broker::event_args(my_event, "bye", 2));
}
event Broker::outgoing_connection_broken(peer_address: string,

View file

@ -18,9 +18,9 @@ event Broker::outgoing_connection_established(peer_address: string,
{
print "Broker::outgoing_connection_established",
peer_address, peer_port, peer_name;
Broker::print("bro/print/hi", "hello");
Broker::print("bro/print/stuff", "...");
Broker::print("bro/print/bye", "goodbye");
Broker::send_print("bro/print/hi", "hello");
Broker::send_print("bro/print/stuff", "...");
Broker::send_print("bro/print/bye", "goodbye");
}
event Broker::outgoing_connection_broken(peer_address: string,

View file

@ -25,6 +25,7 @@
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8080/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 81/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8888/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IMAP, 143/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6666/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6667/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6668/tcp)) -> <no result>
@ -83,6 +84,7 @@
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8080/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 81/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8888/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IMAP, 143/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6666/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6667/tcp)) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6668/tcp)) -> <no result>
@ -122,6 +124,7 @@
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_FTP, {2811<...>/tcp})) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_GTPV1, {2152<...>/udp})) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_HTTP, {631<...>/tcp})) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_IMAP, {143/tcp})) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_IRC, {6669<...>/tcp})) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_KRB, {88/udp})) -> <no result>
0.000000 MetaHookPost CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_KRB_TCP, {88/tcp})) -> <no result>
@ -230,7 +233,7 @@
0.000000 MetaHookPost CallFunction(Log::__create_stream, <frame>, (Weird::LOG, [columns=<no value description>, ev=Weird::log_weird, path=weird])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::__create_stream, <frame>, (X509::LOG, [columns=<no value description>, ev=X509::log_x509, path=x509])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::__create_stream, <frame>, (mysql::LOG, [columns=<no value description>, ev=MySQL::log_mysql, path=mysql])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::__write, <frame>, (PacketFilter::LOG, [ts=1461367323.154279, node=bro, filter=ip or not ip, init=T, success=T])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::__write, <frame>, (PacketFilter::LOG, [ts=1461868125.285894, node=bro, filter=ip or not ip, init=T, success=T])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::add_default_filter, <frame>, (Cluster::LOG)) -> <no result>
0.000000 MetaHookPost CallFunction(Log::add_default_filter, <frame>, (Communication::LOG)) -> <no result>
0.000000 MetaHookPost CallFunction(Log::add_default_filter, <frame>, (Conn::LOG)) -> <no result>
@ -351,7 +354,7 @@
0.000000 MetaHookPost CallFunction(Log::create_stream, <frame>, (Weird::LOG, [columns=<no value description>, ev=Weird::log_weird, path=weird])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::create_stream, <frame>, (X509::LOG, [columns=<no value description>, ev=X509::log_x509, path=x509])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::create_stream, <frame>, (mysql::LOG, [columns=<no value description>, ev=MySQL::log_mysql, path=mysql])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::write, <frame>, (PacketFilter::LOG, [ts=1461367323.154279, node=bro, filter=ip or not ip, init=T, success=T])) -> <no result>
0.000000 MetaHookPost CallFunction(Log::write, <frame>, (PacketFilter::LOG, [ts=1461868125.285894, node=bro, filter=ip or not ip, init=T, success=T])) -> <no result>
0.000000 MetaHookPost CallFunction(NetControl::check_plugins, <frame>, ()) -> <no result>
0.000000 MetaHookPost CallFunction(NetControl::init, <null>, ()) -> <no result>
0.000000 MetaHookPost CallFunction(Notice::want_pp, <frame>, ()) -> <no result>
@ -416,6 +419,7 @@
0.000000 MetaHookPost LoadFile(./Bro_HTTP.events.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(./Bro_HTTP.functions.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(./Bro_ICMP.events.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(./Bro_IMAP.events.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(./Bro_IRC.events.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(./Bro_Ident.events.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(./Bro_InterConn.events.bif.bro) -> -1
@ -566,11 +570,13 @@
0.000000 MetaHookPost LoadFile(base<...>/bro.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/broker) -> -1
0.000000 MetaHookPost LoadFile(base<...>/cluster) -> -1
0.000000 MetaHookPost LoadFile(base<...>/comm.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/communication) -> -1
0.000000 MetaHookPost LoadFile(base<...>/conn) -> -1
0.000000 MetaHookPost LoadFile(base<...>/conn-ids) -> -1
0.000000 MetaHookPost LoadFile(base<...>/const.bif.bro) -> -1
0.000000 MetaHookPost LoadFile(base<...>/control) -> -1
0.000000 MetaHookPost LoadFile(base<...>/data.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/dhcp) -> -1
0.000000 MetaHookPost LoadFile(base<...>/dir) -> -1
0.000000 MetaHookPost LoadFile(base<...>/directions-and-hosts) -> -1
@ -587,6 +593,7 @@
0.000000 MetaHookPost LoadFile(base<...>/ftp) -> -1
0.000000 MetaHookPost LoadFile(base<...>/hash) -> -1
0.000000 MetaHookPost LoadFile(base<...>/http) -> -1
0.000000 MetaHookPost LoadFile(base<...>/imap) -> -1
0.000000 MetaHookPost LoadFile(base<...>/input) -> -1
0.000000 MetaHookPost LoadFile(base<...>/input.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/intel) -> -1
@ -596,6 +603,7 @@
0.000000 MetaHookPost LoadFile(base<...>/logging) -> -1
0.000000 MetaHookPost LoadFile(base<...>/logging.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/main) -> -1
0.000000 MetaHookPost LoadFile(base<...>/messaging.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/modbus) -> -1
0.000000 MetaHookPost LoadFile(base<...>/mysql) -> -1
0.000000 MetaHookPost LoadFile(base<...>/netcontrol) -> -1
@ -623,6 +631,7 @@
0.000000 MetaHookPost LoadFile(base<...>/software) -> -1
0.000000 MetaHookPost LoadFile(base<...>/ssh) -> -1
0.000000 MetaHookPost LoadFile(base<...>/ssl) -> -1
0.000000 MetaHookPost LoadFile(base<...>/store.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/strings) -> -1
0.000000 MetaHookPost LoadFile(base<...>/strings.bif) -> -1
0.000000 MetaHookPost LoadFile(base<...>/sumstats) -> -1
@ -665,6 +674,7 @@
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8080/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 81/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8888/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IMAP, 143/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6666/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6667/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::__register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6668/tcp))
@ -723,6 +733,7 @@
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8080/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 81/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_HTTP, 8888/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IMAP, 143/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6666/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6667/tcp))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_port, <frame>, (Analyzer::ANALYZER_IRC, 6668/tcp))
@ -762,6 +773,7 @@
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_FTP, {2811<...>/tcp}))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_GTPV1, {2152<...>/udp}))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_HTTP, {631<...>/tcp}))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_IMAP, {143/tcp}))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_IRC, {6669<...>/tcp}))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_KRB, {88/udp}))
0.000000 MetaHookPre CallFunction(Analyzer::register_for_ports, <frame>, (Analyzer::ANALYZER_KRB_TCP, {88/tcp}))
@ -870,7 +882,7 @@
0.000000 MetaHookPre CallFunction(Log::__create_stream, <frame>, (Weird::LOG, [columns=<no value description>, ev=Weird::log_weird, path=weird]))
0.000000 MetaHookPre CallFunction(Log::__create_stream, <frame>, (X509::LOG, [columns=<no value description>, ev=X509::log_x509, path=x509]))
0.000000 MetaHookPre CallFunction(Log::__create_stream, <frame>, (mysql::LOG, [columns=<no value description>, ev=MySQL::log_mysql, path=mysql]))
0.000000 MetaHookPre CallFunction(Log::__write, <frame>, (PacketFilter::LOG, [ts=1461367323.154279, node=bro, filter=ip or not ip, init=T, success=T]))
0.000000 MetaHookPre CallFunction(Log::__write, <frame>, (PacketFilter::LOG, [ts=1461868125.285894, node=bro, filter=ip or not ip, init=T, success=T]))
0.000000 MetaHookPre CallFunction(Log::add_default_filter, <frame>, (Cluster::LOG))
0.000000 MetaHookPre CallFunction(Log::add_default_filter, <frame>, (Communication::LOG))
0.000000 MetaHookPre CallFunction(Log::add_default_filter, <frame>, (Conn::LOG))
@ -991,7 +1003,7 @@
0.000000 MetaHookPre CallFunction(Log::create_stream, <frame>, (Weird::LOG, [columns=<no value description>, ev=Weird::log_weird, path=weird]))
0.000000 MetaHookPre CallFunction(Log::create_stream, <frame>, (X509::LOG, [columns=<no value description>, ev=X509::log_x509, path=x509]))
0.000000 MetaHookPre CallFunction(Log::create_stream, <frame>, (mysql::LOG, [columns=<no value description>, ev=MySQL::log_mysql, path=mysql]))
0.000000 MetaHookPre CallFunction(Log::write, <frame>, (PacketFilter::LOG, [ts=1461367323.154279, node=bro, filter=ip or not ip, init=T, success=T]))
0.000000 MetaHookPre CallFunction(Log::write, <frame>, (PacketFilter::LOG, [ts=1461868125.285894, node=bro, filter=ip or not ip, init=T, success=T]))
0.000000 MetaHookPre CallFunction(NetControl::check_plugins, <frame>, ())
0.000000 MetaHookPre CallFunction(NetControl::init, <null>, ())
0.000000 MetaHookPre CallFunction(Notice::want_pp, <frame>, ())
@ -1056,6 +1068,7 @@
0.000000 MetaHookPre LoadFile(./Bro_HTTP.events.bif.bro)
0.000000 MetaHookPre LoadFile(./Bro_HTTP.functions.bif.bro)
0.000000 MetaHookPre LoadFile(./Bro_ICMP.events.bif.bro)
0.000000 MetaHookPre LoadFile(./Bro_IMAP.events.bif.bro)
0.000000 MetaHookPre LoadFile(./Bro_IRC.events.bif.bro)
0.000000 MetaHookPre LoadFile(./Bro_Ident.events.bif.bro)
0.000000 MetaHookPre LoadFile(./Bro_InterConn.events.bif.bro)
@ -1206,11 +1219,13 @@
0.000000 MetaHookPre LoadFile(base<...>/bro.bif)
0.000000 MetaHookPre LoadFile(base<...>/broker)
0.000000 MetaHookPre LoadFile(base<...>/cluster)
0.000000 MetaHookPre LoadFile(base<...>/comm.bif)
0.000000 MetaHookPre LoadFile(base<...>/communication)
0.000000 MetaHookPre LoadFile(base<...>/conn)
0.000000 MetaHookPre LoadFile(base<...>/conn-ids)
0.000000 MetaHookPre LoadFile(base<...>/const.bif.bro)
0.000000 MetaHookPre LoadFile(base<...>/control)
0.000000 MetaHookPre LoadFile(base<...>/data.bif)
0.000000 MetaHookPre LoadFile(base<...>/dhcp)
0.000000 MetaHookPre LoadFile(base<...>/dir)
0.000000 MetaHookPre LoadFile(base<...>/directions-and-hosts)
@ -1227,6 +1242,7 @@
0.000000 MetaHookPre LoadFile(base<...>/ftp)
0.000000 MetaHookPre LoadFile(base<...>/hash)
0.000000 MetaHookPre LoadFile(base<...>/http)
0.000000 MetaHookPre LoadFile(base<...>/imap)
0.000000 MetaHookPre LoadFile(base<...>/input)
0.000000 MetaHookPre LoadFile(base<...>/input.bif)
0.000000 MetaHookPre LoadFile(base<...>/intel)
@ -1236,6 +1252,7 @@
0.000000 MetaHookPre LoadFile(base<...>/logging)
0.000000 MetaHookPre LoadFile(base<...>/logging.bif)
0.000000 MetaHookPre LoadFile(base<...>/main)
0.000000 MetaHookPre LoadFile(base<...>/messaging.bif)
0.000000 MetaHookPre LoadFile(base<...>/modbus)
0.000000 MetaHookPre LoadFile(base<...>/mysql)
0.000000 MetaHookPre LoadFile(base<...>/netcontrol)
@ -1263,6 +1280,7 @@
0.000000 MetaHookPre LoadFile(base<...>/software)
0.000000 MetaHookPre LoadFile(base<...>/ssh)
0.000000 MetaHookPre LoadFile(base<...>/ssl)
0.000000 MetaHookPre LoadFile(base<...>/store.bif)
0.000000 MetaHookPre LoadFile(base<...>/strings)
0.000000 MetaHookPre LoadFile(base<...>/strings.bif)
0.000000 MetaHookPre LoadFile(base<...>/sumstats)
@ -1305,6 +1323,7 @@
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_HTTP, 8080/tcp)
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_HTTP, 81/tcp)
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_HTTP, 8888/tcp)
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_IMAP, 143/tcp)
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_IRC, 6666/tcp)
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_IRC, 6667/tcp)
0.000000 | HookCallFunction Analyzer::__register_for_port(Analyzer::ANALYZER_IRC, 6668/tcp)
@ -1363,6 +1382,7 @@
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_HTTP, 8080/tcp)
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_HTTP, 81/tcp)
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_HTTP, 8888/tcp)
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_IMAP, 143/tcp)
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_IRC, 6666/tcp)
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_IRC, 6667/tcp)
0.000000 | HookCallFunction Analyzer::register_for_port(Analyzer::ANALYZER_IRC, 6668/tcp)
@ -1402,6 +1422,7 @@
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_FTP, {2811<...>/tcp})
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_GTPV1, {2152<...>/udp})
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_HTTP, {631<...>/tcp})
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_IMAP, {143/tcp})
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_IRC, {6669<...>/tcp})
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_KRB, {88/udp})
0.000000 | HookCallFunction Analyzer::register_for_ports(Analyzer::ANALYZER_KRB_TCP, {88/tcp})
@ -1509,7 +1530,7 @@
0.000000 | HookCallFunction Log::__create_stream(Weird::LOG, [columns=<no value description>, ev=Weird::log_weird, path=weird])
0.000000 | HookCallFunction Log::__create_stream(X509::LOG, [columns=<no value description>, ev=X509::log_x509, path=x509])
0.000000 | HookCallFunction Log::__create_stream(mysql::LOG, [columns=<no value description>, ev=MySQL::log_mysql, path=mysql])
0.000000 | HookCallFunction Log::__write(PacketFilter::LOG, [ts=1461367323.154279, node=bro, filter=ip or not ip, init=T, success=T])
0.000000 | HookCallFunction Log::__write(PacketFilter::LOG, [ts=1461868125.285894, node=bro, filter=ip or not ip, init=T, success=T])
0.000000 | HookCallFunction Log::add_default_filter(Cluster::LOG)
0.000000 | HookCallFunction Log::add_default_filter(Communication::LOG)
0.000000 | HookCallFunction Log::add_default_filter(Conn::LOG)
@ -1630,7 +1651,7 @@
0.000000 | HookCallFunction Log::create_stream(Weird::LOG, [columns=<no value description>, ev=Weird::log_weird, path=weird])
0.000000 | HookCallFunction Log::create_stream(X509::LOG, [columns=<no value description>, ev=X509::log_x509, path=x509])
0.000000 | HookCallFunction Log::create_stream(mysql::LOG, [columns=<no value description>, ev=MySQL::log_mysql, path=mysql])
0.000000 | HookCallFunction Log::write(PacketFilter::LOG, [ts=1461367323.154279, node=bro, filter=ip or not ip, init=T, success=T])
0.000000 | HookCallFunction Log::write(PacketFilter::LOG, [ts=1461868125.285894, node=bro, filter=ip or not ip, init=T, success=T])
0.000000 | HookCallFunction NetControl::check_plugins()
0.000000 | HookCallFunction NetControl::init()
0.000000 | HookCallFunction Notice::want_pp()

View file

@ -0,0 +1 @@
[IMAP4rev1, CHILDREN, ENABLE, ID, IDLE, LIST-EXTENDED, LIST-STATUS, LITERAL+, MOVE, NAMESPACE, SASL-IR, SORT, SPECIAL-USE, THREAD=ORDEREDSUBJECT, UIDPLUS, UNSELECT, WITHIN, STARTTLS, AUTH=LOGIN, AUTH=PLAIN]

View file

@ -0,0 +1 @@
Tls started for connection

View file

@ -0,0 +1,10 @@
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path conn
#open 2015-07-22-17-31-02
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes conn_state local_orig local_resp missed_bytes history orig_pkts orig_ip_bytes resp_pkts resp_ip_bytes tunnel_parents
#types time string addr port addr port enum string interval count count string bool bool count string count count count count set[string]
1437584567.812552 CXWv6p3arKYeMETxOg 192.168.17.53 49640 212.227.17.186 143 tcp ssl,imap 2.827002 540 5653 SF - - 0 ShAdDafFr 18 1284 14 6225 (empty)
#close 2015-07-22-17-31-02

View file

@ -0,0 +1,10 @@
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path ssl
#open 2015-07-22-17-31-02
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p version cipher curve server_name resumed last_alert next_protocol established cert_chain_fuids client_cert_chain_fuids subject issuer client_subject client_issuer
#types time string addr port addr port string string string string bool string string bool vector[string] vector[string] string string string string
1437584568.570497 CXWv6p3arKYeMETxOg 192.168.17.53 49640 212.227.17.186 143 TLSv12 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 secp256r1 - F - - T FOWmhO3rUj3SEB5RTb,FjH9n52SzEIJ9UoVK9,FisDHa396LIaZadgG9 (empty) CN=imap.gmx.net,emailAddress=server-certs@1und1.de,L=Montabaur,ST=Rhineland-Palatinate,O=1&1 Mail & Media GmbH,C=DE CN=TeleSec ServerPass DE-1,street=Untere Industriestr. 20,L=Netphen,postalCode=57250,ST=NRW,OU=T-Systems Trust Center,O=T-Systems International GmbH,C=DE - -
#close 2015-07-22-17-31-02

View file

@ -0,0 +1,12 @@
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path x509
#open 2015-07-22-17-31-02
#fields ts id certificate.version certificate.serial certificate.subject certificate.issuer certificate.not_valid_before certificate.not_valid_after certificate.key_alg certificate.sig_alg certificate.key_type certificate.key_length certificate.exponent certificate.curve san.dns san.uri san.email san.ip basic_constraints.ca basic_constraints.path_len
#types time string count string string string time time string string string count string string vector[string] vector[string] vector[string] vector[addr] bool count
1437584568.769690 FOWmhO3rUj3SEB5RTb 3 339D9ED8E73927C9 CN=imap.gmx.net,emailAddress=server-certs@1und1.de,L=Montabaur,ST=Rhineland-Palatinate,O=1&1 Mail & Media GmbH,C=DE CN=TeleSec ServerPass DE-1,street=Untere Industriestr. 20,L=Netphen,postalCode=57250,ST=NRW,OU=T-Systems Trust Center,O=T-Systems International GmbH,C=DE 1384251451.000000 1479427199.000000 rsaEncryption sha1WithRSAEncryption rsa 2048 65537 - imap.gmx.net,imap.gmx.de - - - F -
1437584568.769690 FjH9n52SzEIJ9UoVK9 3 21B6777E8CBD0EA8 CN=TeleSec ServerPass DE-1,street=Untere Industriestr. 20,L=Netphen,postalCode=57250,ST=NRW,OU=T-Systems Trust Center,O=T-Systems International GmbH,C=DE CN=Deutsche Telekom Root CA 2,OU=T-TeleSec Trust Center,O=Deutsche Telekom AG,C=DE 1362146309.000000 1562716740.000000 rsaEncryption sha1WithRSAEncryption rsa 2048 65537 - - - - - T 0
1437584568.769690 FisDHa396LIaZadgG9 3 26 CN=Deutsche Telekom Root CA 2,OU=T-TeleSec Trust Center,O=Deutsche Telekom AG,C=DE CN=Deutsche Telekom Root CA 2,OU=T-TeleSec Trust Center,O=Deutsche Telekom AG,C=DE 931522260.000000 1562716740.000000 rsaEncryption sha1WithRSAEncryption rsa 2048 65537 - - - - - T 5
#close 2015-07-22-17-31-02

View file

@ -3,23 +3,23 @@
#empty_field (empty)
#unset_field -
#path intel
#open 2016-04-11-13-48-49
#open 2016-04-25-23-53-37
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc seen.indicator seen.indicator_type seen.where seen.node sources
#types time string addr port addr port string string string string enum enum string set[string]
1416942644.593119 CXWv6p3arKYeMETxOg 192.168.4.149 49422 23.92.19.75 443 F0txuw2pvrkZOn04a8 application/pkix-cert 23.92.19.75:443/tcp www.pantz.org Intel::DOMAIN X509::IN_CERT bro source1
#close 2016-04-11-13-48-49
#close 2016-04-25-23-53-37
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path intel
#open 2016-04-11-13-48-49
#open 2016-04-25-23-53-38
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc seen.indicator seen.indicator_type seen.where seen.node sources
#types time string addr port addr port string string string string enum enum string set[string]
1170717505.735416 CXWv6p3arKYeMETxOg 192.150.187.164 58868 194.127.84.106 443 FeCwNK3rzqPnZ7eBQ5 application/pkix-cert 194.127.84.106:443/tcp 2c322ae2b7fe91391345e070b63668978bb1c9da Intel::CERT_HASH X509::IN_CERT bro source1
1170717505.934612 CXWv6p3arKYeMETxOg 192.150.187.164 58868 194.127.84.106 443 - - - www.dresdner-privat.de Intel::DOMAIN X509::IN_CERT bro source1
1170717505.934612 CXWv6p3arKYeMETxOg 192.150.187.164 58868 194.127.84.106 443 FeCwNK3rzqPnZ7eBQ5 - - www.dresdner-privat.de Intel::DOMAIN X509::IN_CERT bro source1
1170717508.883051 CjhGID4nQcgTWjvg4c 192.150.187.164 58869 194.127.84.106 443 FjkLnG4s34DVZlaBNc application/pkix-cert 194.127.84.106:443/tcp 2c322ae2b7fe91391345e070b63668978bb1c9da Intel::CERT_HASH X509::IN_CERT bro source1
1170717509.082241 CjhGID4nQcgTWjvg4c 192.150.187.164 58869 194.127.84.106 443 - - - www.dresdner-privat.de Intel::DOMAIN X509::IN_CERT bro source1
1170717509.082241 CjhGID4nQcgTWjvg4c 192.150.187.164 58869 194.127.84.106 443 FjkLnG4s34DVZlaBNc - - www.dresdner-privat.de Intel::DOMAIN X509::IN_CERT bro source1
1170717511.909717 CCvvfg3TEfuqmmG4bh 192.150.187.164 58870 194.127.84.106 443 FQXAWgI2FB5STbrff application/pkix-cert 194.127.84.106:443/tcp 2c322ae2b7fe91391345e070b63668978bb1c9da Intel::CERT_HASH X509::IN_CERT bro source1
1170717512.108799 CCvvfg3TEfuqmmG4bh 192.150.187.164 58870 194.127.84.106 443 - - - www.dresdner-privat.de Intel::DOMAIN X509::IN_CERT bro source1
#close 2016-04-11-13-48-49
1170717512.108799 CCvvfg3TEfuqmmG4bh 192.150.187.164 58870 194.127.84.106 443 FQXAWgI2FB5STbrff - - www.dresdner-privat.de Intel::DOMAIN X509::IN_CERT bro source1
#close 2016-04-25-23-53-38

Binary file not shown.

View file

@ -1,8 +1,8 @@
# @TEST-SERIALIZE: brokercomm
# @TEST-REQUIRES: grep -q ENABLE_BROKER $BUILD/CMakeCache.txt
# @TEST-EXEC: btest-bg-run clone "bro -b -r $TRACES/wikipedia.trace ../clone.bro broker_port=$BROKER_PORT >clone.out"
# @TEST-EXEC: btest-bg-run master "bro -b -r $TRACES/wikipedia.trace ../master.bro broker_port=$BROKER_PORT >master.out"
# @TEST-EXEC: btest-bg-run clone "bro -b ../clone.bro broker_port=$BROKER_PORT >clone.out"
# @TEST-EXEC: btest-bg-run master "bro -b ../master.bro broker_port=$BROKER_PORT >master.out"
# @TEST-EXEC: btest-bg-wait 60
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff clone/clone.out

View file

@ -22,12 +22,12 @@ event bro_init()
event Broker::incoming_connection_established(peer_name: string)
{
print "Broker::incoming_connection_established", peer_name;;
print "Broker::incoming_connection_established", peer_name;
}
event Broker::incoming_connection_broken(peer_name: string)
{
print "Broker::incoming_connection_broken", peer_name;;
print "Broker::incoming_connection_broken", peer_name;
terminate();
}
@ -50,7 +50,7 @@ event Broker::outgoing_connection_established(peer_address: string,
peer_name: string)
{
print "Broker::outgoing_connection_established",
peer_address, peer_port, peer_name;;
peer_address, peer_port, peer_name;
terminate();
}

View file

@ -13,7 +13,7 @@ type bro_record : record {
c: count;
};
function comm_record_to_bro_record_recurse(it: opaque of Broker::RecordIterator,
function broker_to_bro_record_recurse(it: opaque of Broker::RecordIterator,
rval: bro_record,
idx: count): bro_record
{
@ -37,17 +37,17 @@ function comm_record_to_bro_record_recurse(it: opaque of Broker::RecordIterator,
++idx;
Broker::record_iterator_next(it);
return comm_record_to_bro_record_recurse(it, rval, idx);
return broker_to_bro_record_recurse(it, rval, idx);
}
function comm_record_to_bro_record(d: Broker::Data): bro_record
function broker_to_bro_record(d: Broker::Data): bro_record
{
return comm_record_to_bro_record_recurse(Broker::record_iterator(d),
return broker_to_bro_record_recurse(Broker::record_iterator(d),
bro_record($c = 0), 0);
}
function
comm_set_to_bro_set_recurse(it: opaque of Broker::SetIterator,
broker_to_bro_set_recurse(it: opaque of Broker::SetIterator,
rval: bro_set): bro_set
{
if ( Broker::set_iterator_last(it) )
@ -55,17 +55,17 @@ comm_set_to_bro_set_recurse(it: opaque of Broker::SetIterator,
add rval[Broker::refine_to_string(Broker::set_iterator_value(it))];
Broker::set_iterator_next(it);
return comm_set_to_bro_set_recurse(it, rval);
return broker_to_bro_set_recurse(it, rval);
}
function comm_set_to_bro_set(d: Broker::Data): bro_set
function broker_to_bro_set(d: Broker::Data): bro_set
{
return comm_set_to_bro_set_recurse(Broker::set_iterator(d), bro_set());
return broker_to_bro_set_recurse(Broker::set_iterator(d), bro_set());
}
function
comm_table_to_bro_table_recurse(it: opaque of Broker::TableIterator,
broker_to_bro_table_recurse(it: opaque of Broker::TableIterator,
rval: bro_table): bro_table
{
if ( Broker::table_iterator_last(it) )
@ -74,16 +74,16 @@ comm_table_to_bro_table_recurse(it: opaque of Broker::TableIterator,
local item = Broker::table_iterator_value(it);
rval[Broker::refine_to_string(item$key)] = Broker::refine_to_count(item$val);
Broker::table_iterator_next(it);
return comm_table_to_bro_table_recurse(it, rval);
return broker_to_bro_table_recurse(it, rval);
}
function comm_table_to_bro_table(d: Broker::Data): bro_table
function broker_to_bro_table(d: Broker::Data): bro_table
{
return comm_table_to_bro_table_recurse(Broker::table_iterator(d),
return broker_to_bro_table_recurse(Broker::table_iterator(d),
bro_table());
}
function comm_vector_to_bro_vector_recurse(it: opaque of Broker::VectorIterator,
function broker_to_bro_vector_recurse(it: opaque of Broker::VectorIterator,
rval: bro_vector): bro_vector
{
if ( Broker::vector_iterator_last(it) )
@ -91,18 +91,21 @@ function comm_vector_to_bro_vector_recurse(it: opaque of Broker::VectorIterator,
rval[|rval|] = Broker::refine_to_string(Broker::vector_iterator_value(it));
Broker::vector_iterator_next(it);
return comm_vector_to_bro_vector_recurse(it, rval);
return broker_to_bro_vector_recurse(it, rval);
}
function comm_vector_to_bro_vector(d: Broker::Data): bro_vector
function broker_to_bro_vector(d: Broker::Data): bro_vector
{
return comm_vector_to_bro_vector_recurse(Broker::vector_iterator(d),
return broker_to_bro_vector_recurse(Broker::vector_iterator(d),
bro_vector());
}
event bro_init()
{
Broker::enable();
### Print every broker data type
print Broker::data_type(Broker::data(T));
print Broker::data_type(Broker::data(+1));
print Broker::data_type(Broker::data(1));
@ -125,6 +128,8 @@ print Broker::data_type(Broker::data(r));
print "***************************";
### Convert a Bro value to a broker value, then print the result
print Broker::refine_to_bool(Broker::data(T));
print Broker::refine_to_bool(Broker::data(F));
print Broker::refine_to_int(Broker::data(+1));
@ -142,10 +147,30 @@ print Broker::refine_to_time(Broker::data(double_to_time(42)));
print Broker::refine_to_interval(Broker::data(3min));
print Broker::refine_to_enum_name(Broker::data(Broker::BOOL));
local cs = Broker::data(s);
print broker_to_bro_set(cs);
local ct = Broker::data(t);
print broker_to_bro_table(ct);
local cv = Broker::data(v);
print broker_to_bro_vector(cv);
local cr = Broker::data(r);
print broker_to_bro_record(cr);
r$a = "test";
cr = Broker::data(r);
print broker_to_bro_record(cr);
r$b = "testagain";
cr = Broker::data(r);
print broker_to_bro_record(cr);
print "***************************";
local cs = Broker::data(s);
print comm_set_to_bro_set(cs);
### Test the broker set BIFs
cs = Broker::set_create();
print Broker::set_size(cs);
print Broker::set_insert(cs, Broker::data("hi"));
@ -154,17 +179,20 @@ print Broker::set_contains(cs, Broker::data("hi"));
print Broker::set_contains(cs, Broker::data("bye"));
print Broker::set_insert(cs, Broker::data("bye"));
print Broker::set_size(cs);
print Broker::set_insert(cs, Broker::data("bye"));
print Broker::set_size(cs);
print Broker::set_remove(cs, Broker::data("hi"));
print Broker::set_size(cs);
print Broker::set_remove(cs, Broker::data("hi"));
print comm_set_to_bro_set(cs);
Broker::set_clear(cs);
print broker_to_bro_set(cs);
print Broker::set_clear(cs);
print Broker::set_size(cs);
print broker_to_bro_set(cs);
print "***************************";
local ct = Broker::data(t);
print comm_table_to_bro_table(ct);
### Test the broker table BIFs
ct = Broker::table_create();
print Broker::table_size(ct);
print Broker::table_insert(ct, Broker::data("hi"), Broker::data(42));
@ -179,37 +207,39 @@ print Broker::table_size(ct);
print Broker::refine_to_count(Broker::table_lookup(ct, Broker::data("bye")));
print Broker::table_remove(ct, Broker::data("hi"));
print Broker::table_size(ct);
print Broker::table_remove(ct, Broker::data("hi"));
print Broker::table_size(ct);
print Broker::table_clear(ct);
print Broker::table_size(ct);
print broker_to_bro_table(ct);
print "***************************";
local cv = Broker::data(v);
print comm_vector_to_bro_vector(cv);
### Test the broker vector BIFs
cv = Broker::vector_create();
print Broker::vector_size(cv);
print Broker::vector_insert(cv, Broker::data("hi"), 0);
print Broker::vector_insert(cv, Broker::data("hello"), 1);
print Broker::vector_insert(cv, Broker::data("greetings"), 2);
print Broker::vector_insert(cv, Broker::data("salutations"), 1);
print comm_vector_to_bro_vector(cv);
print broker_to_bro_vector(cv);
print Broker::vector_size(cv);
print Broker::vector_replace(cv, Broker::data("bah"), 2);
print Broker::vector_lookup(cv, 2);
print Broker::vector_lookup(cv, 0);
print comm_vector_to_bro_vector(cv);
print broker_to_bro_vector(cv);
print Broker::vector_remove(cv, 2);
print comm_vector_to_bro_vector(cv);
print broker_to_bro_vector(cv);
print Broker::vector_size(cv);
print Broker::vector_clear(cv);
print Broker::vector_size(cv);
print broker_to_bro_vector(cv);
print "***************************";
local cr = Broker::data(r);
print comm_record_to_bro_record(cr);
r$a = "test";
cr = Broker::data(r);
print comm_record_to_bro_record(cr);
r$b = "testagain";
cr = Broker::data(r);
print comm_record_to_bro_record(cr);
### Test the broker record BIFs
cr = Broker::record_create(3);
print Broker::record_size(cr);
print Broker::record_assign(cr, Broker::data("hi"), 0);
@ -219,4 +249,7 @@ print Broker::record_lookup(cr, 0);
print Broker::record_lookup(cr, 1);
print Broker::record_lookup(cr, 2);
print Broker::record_size(cr);
print Broker::record_assign(cr, Broker::data("goodbye"), 1);
print Broker::record_size(cr);
print Broker::record_lookup(cr, 1);
}

View file

@ -40,7 +40,7 @@ event event_handler(msg: string, n: count)
event auto_event_handler(msg, n);
local args = Broker::event_args(event_handler, "pong", n);
Broker::event("bro/event/my_topic", args);
Broker::send_event("bro/event/my_topic", args);
}
@TEST-END-FILE
@ -68,7 +68,7 @@ event Broker::outgoing_connection_established(peer_address: string,
{
print "Broker::outgoing_connection_established", peer_address, peer_port;
local args = Broker::event_args(event_handler, "ping", event_count);
Broker::event("bro/event/hi", args);
Broker::send_event("bro/event/hi", args);
++event_count;
}
@ -82,7 +82,7 @@ event event_handler(msg: string, n: count)
{
print "got event msg", msg, n;
local args = Broker::event_args(event_handler, "ping", event_count);
Broker::event("bro/event/hi", args);
Broker::send_event("bro/event/hi", args);
++event_count;
}

View file

@ -16,8 +16,8 @@ redef exit_only_after_terminate = T;
event bro_init()
{
Broker::enable();
Broker::listen(broker_port, "127.0.0.1");
Broker::subscribe_to_prints("bro/print/");
Broker::listen(broker_port, "127.0.0.1");
}
global messages_to_recv = 6;
@ -35,7 +35,7 @@ event Broker::print_handler(msg: string)
return;
}
Broker::print("bro/print/my_topic", fmt("pong %d", messages_sent));
Broker::send_print("bro/print/my_topic", fmt("pong %d", messages_sent));
++messages_sent;
}
@ -62,7 +62,7 @@ event Broker::outgoing_connection_established(peer_address: string,
peer_name: string)
{
print "Broker::outgoing_connection_established", peer_address, peer_port;
Broker::print("bro/print/hi", fmt("ping %d", messages_sent));
Broker::send_print("bro/print/hi", fmt("ping %d", messages_sent));
++messages_sent;
}
@ -76,7 +76,7 @@ event Broker::print_handler(msg: string)
{
++messages_recv;
print "got print msg", msg;
Broker::print("bro/print/hi", fmt("ping %d", messages_sent));
Broker::send_print("bro/print/hi", fmt("ping %d", messages_sent));
++messages_sent;
}

View file

@ -51,8 +51,8 @@ event ready()
event bro_init()
{
Broker::enable();
Broker::listen(broker_port, "127.0.0.1");
Broker::subscribe_to_events("bro/event/ready");
Broker::listen(broker_port, "127.0.0.1");
}
@TEST-END-FILE
@ -105,9 +105,9 @@ event Broker::outgoing_connection_established(peer_address: string,
event bro_init()
{
Broker::enable();
Broker::auto_event("bro/event/ready", ready);
h = Broker::create_master("mystore");
Broker::connect("127.0.0.1", broker_port, 1secs);
Broker::auto_event("bro/event/ready", ready);
}
@TEST-END-FILE

View file

@ -16,7 +16,7 @@ type bro_record : record {
c: count;
};
function comm_record_to_bro_record_recurse(it: opaque of Broker::RecordIterator,
function broker_to_bro_record_recurse(it: opaque of Broker::RecordIterator,
rval: bro_record,
idx: count): bro_record
{
@ -40,17 +40,17 @@ function comm_record_to_bro_record_recurse(it: opaque of Broker::RecordIterator,
++idx;
Broker::record_iterator_next(it);
return comm_record_to_bro_record_recurse(it, rval, idx);
return broker_to_bro_record_recurse(it, rval, idx);
}
function comm_record_to_bro_record(d: Broker::Data): bro_record
function broker_to_bro_record(d: Broker::Data): bro_record
{
return comm_record_to_bro_record_recurse(Broker::record_iterator(d),
return broker_to_bro_record_recurse(Broker::record_iterator(d),
bro_record($c = 0), 0);
}
function
comm_set_to_bro_set_recurse(it: opaque of Broker::SetIterator,
broker_to_bro_set_recurse(it: opaque of Broker::SetIterator,
rval: bro_set): bro_set
{
if ( Broker::set_iterator_last(it) )
@ -58,17 +58,17 @@ comm_set_to_bro_set_recurse(it: opaque of Broker::SetIterator,
add rval[Broker::refine_to_string(Broker::set_iterator_value(it))];
Broker::set_iterator_next(it);
return comm_set_to_bro_set_recurse(it, rval);
return broker_to_bro_set_recurse(it, rval);
}
function comm_set_to_bro_set(d: Broker::Data): bro_set
function broker_to_bro_set(d: Broker::Data): bro_set
{
return comm_set_to_bro_set_recurse(Broker::set_iterator(d), bro_set());
return broker_to_bro_set_recurse(Broker::set_iterator(d), bro_set());
}
function
comm_table_to_bro_table_recurse(it: opaque of Broker::TableIterator,
broker_to_bro_table_recurse(it: opaque of Broker::TableIterator,
rval: bro_table): bro_table
{
if ( Broker::table_iterator_last(it) )
@ -77,16 +77,16 @@ comm_table_to_bro_table_recurse(it: opaque of Broker::TableIterator,
local item = Broker::table_iterator_value(it);
rval[Broker::refine_to_string(item$key)] = Broker::refine_to_count(item$val);
Broker::table_iterator_next(it);
return comm_table_to_bro_table_recurse(it, rval);
return broker_to_bro_table_recurse(it, rval);
}
function comm_table_to_bro_table(d: Broker::Data): bro_table
function broker_to_bro_table(d: Broker::Data): bro_table
{
return comm_table_to_bro_table_recurse(Broker::table_iterator(d),
return broker_to_bro_table_recurse(Broker::table_iterator(d),
bro_table());
}
function comm_vector_to_bro_vector_recurse(it: opaque of Broker::VectorIterator,
function broker_to_bro_vector_recurse(it: opaque of Broker::VectorIterator,
rval: bro_vector): bro_vector
{
if ( Broker::vector_iterator_last(it) )
@ -94,26 +94,29 @@ function comm_vector_to_bro_vector_recurse(it: opaque of Broker::VectorIterator,
rval[|rval|] = Broker::refine_to_string(Broker::vector_iterator_value(it));
Broker::vector_iterator_next(it);
return comm_vector_to_bro_vector_recurse(it, rval);
return broker_to_bro_vector_recurse(it, rval);
}
function comm_vector_to_bro_vector(d: Broker::Data): bro_vector
function broker_to_bro_vector(d: Broker::Data): bro_vector
{
return comm_vector_to_bro_vector_recurse(Broker::vector_iterator(d),
return broker_to_bro_vector_recurse(Broker::vector_iterator(d),
bro_vector());
}
event bro_init()
{
{
Broker::enable();
}
}
global did_it = F;
event new_connection(c: connection)
{
{
if ( did_it ) return;
did_it = T;
### Print every broker data type
print Broker::data_type(Broker::data(T));
print Broker::data_type(Broker::data(+1));
print Broker::data_type(Broker::data(1));
@ -136,6 +139,8 @@ print Broker::data_type(Broker::data(r));
print "***************************";
### Convert a Bro value to a broker value, then print the result
print Broker::refine_to_bool(Broker::data(T));
print Broker::refine_to_bool(Broker::data(F));
print Broker::refine_to_int(Broker::data(+1));
@ -153,10 +158,30 @@ print Broker::refine_to_time(Broker::data(double_to_time(42)));
print Broker::refine_to_interval(Broker::data(3min));
print Broker::refine_to_enum_name(Broker::data(Broker::BOOL));
local cs = Broker::data(s);
print broker_to_bro_set(cs);
local ct = Broker::data(t);
print broker_to_bro_table(ct);
local cv = Broker::data(v);
print broker_to_bro_vector(cv);
local cr = Broker::data(r);
print broker_to_bro_record(cr);
r$a = "test";
cr = Broker::data(r);
print broker_to_bro_record(cr);
r$b = "testagain";
cr = Broker::data(r);
print broker_to_bro_record(cr);
print "***************************";
local cs = Broker::data(s);
print comm_set_to_bro_set(cs);
### Test the broker set BIFs
cs = Broker::set_create();
print Broker::set_size(cs);
print Broker::set_insert(cs, Broker::data("hi"));
@ -165,17 +190,20 @@ print Broker::set_contains(cs, Broker::data("hi"));
print Broker::set_contains(cs, Broker::data("bye"));
print Broker::set_insert(cs, Broker::data("bye"));
print Broker::set_size(cs);
print Broker::set_insert(cs, Broker::data("bye"));
print Broker::set_size(cs);
print Broker::set_remove(cs, Broker::data("hi"));
print Broker::set_size(cs);
print Broker::set_remove(cs, Broker::data("hi"));
print comm_set_to_bro_set(cs);
Broker::set_clear(cs);
print broker_to_bro_set(cs);
print Broker::set_clear(cs);
print Broker::set_size(cs);
print broker_to_bro_set(cs);
print "***************************";
local ct = Broker::data(t);
print comm_table_to_bro_table(ct);
### Test the broker table BIFs
ct = Broker::table_create();
print Broker::table_size(ct);
print Broker::table_insert(ct, Broker::data("hi"), Broker::data(42));
@ -190,37 +218,39 @@ print Broker::table_size(ct);
print Broker::refine_to_count(Broker::table_lookup(ct, Broker::data("bye")));
print Broker::table_remove(ct, Broker::data("hi"));
print Broker::table_size(ct);
print Broker::table_remove(ct, Broker::data("hi"));
print Broker::table_size(ct);
print Broker::table_clear(ct);
print Broker::table_size(ct);
print broker_to_bro_table(ct);
print "***************************";
local cv = Broker::data(v);
print comm_vector_to_bro_vector(cv);
### Test the broker vector BIFs
cv = Broker::vector_create();
print Broker::vector_size(cv);
print Broker::vector_insert(cv, Broker::data("hi"), 0);
print Broker::vector_insert(cv, Broker::data("hello"), 1);
print Broker::vector_insert(cv, Broker::data("greetings"), 2);
print Broker::vector_insert(cv, Broker::data("salutations"), 1);
print comm_vector_to_bro_vector(cv);
print broker_to_bro_vector(cv);
print Broker::vector_size(cv);
print Broker::vector_replace(cv, Broker::data("bah"), 2);
print Broker::vector_lookup(cv, 2);
print Broker::vector_lookup(cv, 0);
print comm_vector_to_bro_vector(cv);
print broker_to_bro_vector(cv);
print Broker::vector_remove(cv, 2);
print comm_vector_to_bro_vector(cv);
print broker_to_bro_vector(cv);
print Broker::vector_size(cv);
print Broker::vector_clear(cv);
print Broker::vector_size(cv);
print broker_to_bro_vector(cv);
print "***************************";
local cr = Broker::data(r);
print comm_record_to_bro_record(cr);
r$a = "test";
cr = Broker::data(r);
print comm_record_to_bro_record(cr);
r$b = "testagain";
cr = Broker::data(r);
print comm_record_to_bro_record(cr);
### Test the broker record BIFs
cr = Broker::record_create(3);
print Broker::record_size(cr);
print Broker::record_assign(cr, Broker::data("hi"), 0);
@ -230,4 +260,7 @@ print Broker::record_lookup(cr, 0);
print Broker::record_lookup(cr, 1);
print Broker::record_lookup(cr, 2);
print Broker::record_size(cr);
print Broker::record_assign(cr, Broker::data("goodbye"), 1);
print Broker::record_size(cr);
print Broker::record_lookup(cr, 1);
}

View file

@ -21,9 +21,9 @@ global auto_event_handler: event(msg: string, c: count);
event bro_init()
{
Broker::enable();
Broker::listen(broker_port, "127.0.0.1");
Broker::subscribe_to_events("bro/event/");
Broker::auto_event("bro/event/my_topic", auto_event_handler);
Broker::listen(broker_port, "127.0.0.1");
}
global event_count = 0;
@ -42,7 +42,7 @@ event event_handler(msg: string, n: count)
event auto_event_handler(msg, n);
local args = Broker::event_args(event_handler, "pong", n);
Broker::event("bro/event/my_topic", args);
Broker::send_event("bro/event/my_topic", args);
}
@TEST-END-FILE
@ -70,7 +70,7 @@ event Broker::outgoing_connection_established(peer_address: string,
{
print "Broker::outgoing_connection_established", peer_address, peer_port;
local args = Broker::event_args(event_handler, "ping", event_count);
Broker::event("bro/event/hi", args);
Broker::send_event("bro/event/hi", args);
++event_count;
}
@ -84,7 +84,7 @@ event event_handler(msg: string, n: count)
{
print "got event msg", msg, n;
local args = Broker::event_args(event_handler, "ping", event_count);
Broker::event("bro/event/hi", args);
Broker::send_event("bro/event/hi", args);
++event_count;
}

View file

@ -42,8 +42,8 @@ redef exit_only_after_terminate = T;
event bro_init()
{
Broker::listen(broker_port, "127.0.0.1");
Broker::subscribe_to_logs("bro/log/");
Broker::listen(broker_port, "127.0.0.1");
}
event Test::log_test(rec: Test::Info)

View file

@ -18,8 +18,8 @@ redef exit_only_after_terminate = T;
event bro_init()
{
Broker::enable();
Broker::listen(broker_port, "127.0.0.1");
Broker::subscribe_to_prints("bro/print/");
Broker::listen(broker_port, "127.0.0.1");
}
global messages_to_recv = 6;
@ -37,7 +37,7 @@ event Broker::print_handler(msg: string)
return;
}
Broker::print("bro/print/my_topic", fmt("pong %d", messages_sent));
Broker::send_print("bro/print/my_topic", fmt("pong %d", messages_sent));
++messages_sent;
}
@ -64,7 +64,7 @@ event Broker::outgoing_connection_established(peer_address: string,
peer_name: string)
{
print "Broker::outgoing_connection_established", peer_address, peer_port;
Broker::print("bro/print/hi", fmt("ping %d", messages_sent));
Broker::send_print("bro/print/hi", fmt("ping %d", messages_sent));
++messages_sent;
}
@ -78,7 +78,7 @@ event Broker::print_handler(msg: string)
{
++messages_recv;
print "got print msg", msg;
Broker::print("bro/print/hi", fmt("ping %d", messages_sent));
Broker::send_print("bro/print/hi", fmt("ping %d", messages_sent));
++messages_sent;
}

View file

@ -21,11 +21,11 @@ event Broker::outgoing_connection_established(peer_address: string,
{
print "Broker::outgoing_connection_established",
peer_address, peer_port, peer_name;
Broker::event("bro/event/my_event", Broker::event_args(my_event, "hi", 0));
Broker::send_event("bro/event/my_event", Broker::event_args(my_event, "hi", 0));
event my_auto_event("stuff", 88);
Broker::event("bro/event/my_event", Broker::event_args(my_event, "...", 1));
Broker::send_event("bro/event/my_event", Broker::event_args(my_event, "...", 1));
event my_auto_event("more stuff", 51);
Broker::event("bro/event/my_event", Broker::event_args(my_event, "bye", 2));
Broker::send_event("bro/event/my_event", Broker::event_args(my_event, "bye", 2));
}
event Broker::outgoing_connection_broken(peer_address: string,

View file

@ -18,9 +18,9 @@ event Broker::outgoing_connection_established(peer_address: string,
{
print "Broker::outgoing_connection_established",
peer_address, peer_port, peer_name;
Broker::print("bro/print/hi", "hello");
Broker::print("bro/print/stuff", "...");
Broker::print("bro/print/bye", "goodbye");
Broker::send_print("bro/print/hi", "hello");
Broker::send_print("bro/print/stuff", "...");
Broker::send_print("bro/print/bye", "goodbye");
}
event Broker::outgoing_connection_broken(peer_address: string,

View file

@ -105,14 +105,14 @@ event NetControl::acld_add_rule(id: count, r: NetControl::Rule, ar: NetControl::
{
print "add_rule", id, r$entity, r$ty, ar;
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_added, id, r, ar$command));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_added, id, r, ar$command));
}
event NetControl::acld_remove_rule(id: count, r: NetControl::Rule, ar: NetControl::AclRule)
{
print "remove_rule", id, r$entity, r$ty, ar;
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_removed, id, r, ar$command));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_removed, id, r, ar$command));
if ( r$cid == 4 )
terminate();

View file

@ -98,14 +98,14 @@ event NetControl::acld_add_rule(id: count, r: NetControl::Rule, ar: NetControl::
{
print "add_rule", id, r$entity, r$ty, ar;
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_added, id, r, ar$command));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_added, id, r, ar$command));
}
event NetControl::acld_remove_rule(id: count, r: NetControl::Rule, ar: NetControl::AclRule)
{
print "remove_rule", id, r$entity, r$ty, ar;
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_removed, id, r, ar$command));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::acld_rule_removed, id, r, ar$command));
if ( r$cid == 4 )
terminate();

View file

@ -89,15 +89,15 @@ event NetControl::broker_add_rule(id: count, r: NetControl::Rule)
{
print "add_rule", id, r$entity, r$ty;
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_added, id, r, ""));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_added, id, r, ""));
}
event NetControl::broker_remove_rule(id: count, r: NetControl::Rule)
{
print "remove_rule", id, r$entity, r$ty;
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_timeout, id, r, NetControl::FlowInfo()));
Broker::event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_removed, id, r, ""));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_timeout, id, r, NetControl::FlowInfo()));
Broker::send_event("bro/event/netcontroltest", Broker::event_args(NetControl::broker_rule_removed, id, r, ""));
if ( r$cid == 3 )
terminate();

View file

@ -104,8 +104,8 @@ function got_message()
event OpenFlow::broker_flow_mod(name: string, dpid: count, match: OpenFlow::ofp_match, flow_mod: OpenFlow::ofp_flow_mod)
{
print "got flow_mod", dpid, match, flow_mod;
Broker::event("bro/event/openflow", Broker::event_args(OpenFlow::flow_mod_success, name, match, flow_mod, ""));
Broker::event("bro/event/openflow", Broker::event_args(OpenFlow::flow_mod_failure, name, match, flow_mod, ""));
Broker::send_event("bro/event/openflow", Broker::event_args(OpenFlow::flow_mod_success, name, match, flow_mod, ""));
Broker::send_event("bro/event/openflow", Broker::event_args(OpenFlow::flow_mod_failure, name, match, flow_mod, ""));
got_message();
}

View file

@ -0,0 +1,12 @@
# @TEST-EXEC: bro -b -C -r $TRACES/tls/imap-starttls.pcap %INPUT
# @TEST-EXEC: btest-diff .stdout
@load base/protocols/ssl
@load base/protocols/conn
@load base/frameworks/dpd
@load base/protocols/imap
event imap_capabilities(c: connection, capabilities: string_vec)
{
print capabilities;
}

View file

@ -0,0 +1,15 @@
# @TEST-EXEC: bro -b -C -r $TRACES/tls/imap-starttls.pcap %INPUT
# @TEST-EXEC: btest-diff conn.log
# @TEST-EXEC: btest-diff ssl.log
# @TEST-EXEC: btest-diff x509.log
# @TEST-EXEC: btest-diff .stdout
@load base/protocols/ssl
@load base/protocols/conn
@load base/frameworks/dpd
@load base/protocols/imap
event imap_starttls(c: connection)
{
print "Tls started for connection";
}