mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
mainly add a small test to the pacf framework that uses the debug
plugin for shunt / drop rule additions...
This commit is contained in:
parent
00204ab8a6
commit
fd07b0bee9
3 changed files with 40 additions and 0 deletions
18
testing/btest/scripts/base/frameworks/pacf/basic.bro
Normal file
18
testing/btest/scripts/base/frameworks/pacf/basic.bro
Normal file
|
@ -0,0 +1,18 @@
|
|||
# @TEST-EXEC: bro -r $TRACES/smtp.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff pacf.log
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
@load base/frameworks/pacf
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
local pacf_debug = Pacf::create_debug(T);
|
||||
Pacf::activate(pacf_debug, 0);
|
||||
}
|
||||
|
||||
event connection_established(c: connection)
|
||||
{
|
||||
local id = c$id;
|
||||
Pacf::shunt_flow([$src_h=id$orig_h, $src_p=id$orig_p, $dst_h=id$resp_h, $dst_p=id$resp_p], 30sec);
|
||||
Pacf::drop_address(id$orig_h, 15sec);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue