zeek/auxil/spicy/doc/tutorial/examples/udp-contents.zeek
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

20 lines
410 B
Plaintext

redef udp_content_deliver_all_orig = T;
redef udp_content_deliver_all_resp = T;
event udp_contents(u: connection, is_orig: bool, contents: string)
{
local fname: string;
if ( is_orig )
fname = fmt("udp-contents.orig.%.6f.dat", network_time());
else
fname = fmt("udp-contents.resp.%.6f.dat", network_time());
local out = open(fname);
enable_raw_output(out);
print out, contents;
close(out);
}