Hello,
I’m attempting to retrieve TCP payloads through the “tcp_contents” event, and I tried a simple demo script as below.
# Redefine tcp_content_deliver_all_orig/resp to deliver all requests/responses
redef tcp_content_deliver_all_orig = T;
redef tcp_content_deliver_all_resp = T;
event tcp_contents(c: connection, is_orig: bool, seq: count, contents: string)
{
local end_point = is_orig ? "originator" : "responder";
print fmt("TCP contents of connection %s (%s):", c$uid, end_point);
print contents;
}
The script ran successfully on the https://try.bro.org website with Zeek version 5.1.0
and the exercise_traffic.pcap
file.
However, when I tried to run the same script locally using the command zeek -r sample.pcap demo.zeek
, I received errors from Zeek as follows:
error in ./demo.zeek, line 33 and /home/zeek/Workspace/zeek-5.2.0-rc2/share/zeek/base/bif/plugins/./Zeek_TCP.events.bif.zeek, line 319: use of undeclared alternate prototype (event(c:connection; is_orig:bool; contents:string;) and tcp_contents)
I suspect that the use of undeclared alternate prototype
error indicating the script requires some other dependent scripts to be loaded. I have tried to load some, but without success. I do not know the exact command that was run on the try.zeek website, so I wonder if could help to point out what the errors are.
Thank you!