mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Rename Pacf to NetControl
This commit is contained in:
parent
eb9fbd1258
commit
0e213352d7
61 changed files with 498 additions and 498 deletions
20
testing/btest/scripts/base/frameworks/netcontrol/basic.bro
Normal file
20
testing/btest/scripts/base/frameworks/netcontrol/basic.bro
Normal file
|
@ -0,0 +1,20 @@
|
|||
# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER='grep -v ^# | $SCRIPTS/diff-sort' btest-diff netcontrol.log
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff .stdout
|
||||
|
||||
@load base/frameworks/netcontrol
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
local netcontrol_debug = NetControl::create_debug(T);
|
||||
NetControl::activate(netcontrol_debug, 0);
|
||||
}
|
||||
|
||||
event connection_established(c: connection)
|
||||
{
|
||||
local id = c$id;
|
||||
NetControl::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec);
|
||||
NetControl::drop_address(id$orig_h, 15sec);
|
||||
NetControl::whitelist_address(id$orig_h, 15sec);
|
||||
NetControl::redirect_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 5, 30sec);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue