Created
March 12, 2014 15:45
-
-
Save jsiwek/9509511 to your computer and use it in GitHub Desktop.
Example of exchanging events between Bro instances.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redef Communication::nodes += { | |
["foo"] = [$host = 127.0.0.1, $p=1337/tcp, $events = /my_event_response/, $connect=T] | |
}; | |
event my_event_request(details: string) | |
{ | |
print "sent my_event_request", details; | |
} | |
event my_event_response(details: count) | |
{ | |
print "recv my_event_response", details; | |
print "terminating"; | |
terminate(); | |
} | |
event remote_connection_handshake_done(p: event_peer) | |
{ | |
print fmt("connection established to: %s", p); | |
event my_event_request("hello"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment