mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00

This is based on commit 99e6942efec5feff50523f6b2a1f5868f19ab638 from the zeek-docs repo.
17 lines
352 B
Text
17 lines
352 B
Text
event NetControl::init()
|
|
{
|
|
local netcontrol_debug = NetControl::create_debug(T);
|
|
NetControl::activate(netcontrol_debug, 0);
|
|
}
|
|
|
|
event connection_established(c: connection)
|
|
{
|
|
if ( |NetControl::find_rules_addr(c$id$orig_h)| > 0 )
|
|
{
|
|
print "Rule already exists";
|
|
return;
|
|
}
|
|
|
|
NetControl::drop_connection(c$id, 20 secs);
|
|
print "Rule added";
|
|
}
|