mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00

- Fixing the parts of the `make restdoc` and `make doc` process that were broken by the last Bro script re-organization - Generated documentation for Bro scripts derived from BiFs now use the original BiF source file as the "original source file" link - Renaming of the internal POLICYDEST definition and other misc places that refer to "policy" scripts; that terminology doesn't make total sense now - Added a documentation blacklist reminder test that will fail if there's scripts that are blacklisted from being documentated because they're still in progress - Some minor Bro script changes to fix small @load dependency errors Addresses #543
40 lines
833 B
Text
40 lines
833 B
Text
|
|
module Notice;
|
|
|
|
# This probably doesn't actually work due to the async lookup_addr.
|
|
event Notice::notice(n: Notice::Info) &priority=10
|
|
{
|
|
if ( ! n?$src && ! n?$dst )
|
|
return;
|
|
|
|
# This should only be done for notices that are being sent to email.
|
|
if ( ACTION_EMAIL !in n$actions )
|
|
return;
|
|
|
|
local output = "";
|
|
if ( n?$src )
|
|
{
|
|
when ( local src_name = lookup_addr(n$src) )
|
|
{
|
|
output = cat(output, "orig_h/src: ", src_name, "\n");
|
|
}
|
|
timeout 5secs
|
|
{
|
|
output = cat(output, "orig_h/src: <timeout>\n");
|
|
}
|
|
}
|
|
if ( n?$dst )
|
|
{
|
|
when ( local dst_name = lookup_addr(n$dst) )
|
|
{
|
|
output = cat(output, "resp_h/dst: ", dst_name, "\n");
|
|
}
|
|
timeout 5secs
|
|
{
|
|
output = cat(output, "resp_h/dst: <timeout>\n");
|
|
}
|
|
}
|
|
|
|
if ( output != "" )
|
|
n$email_body_sections[|n$email_body_sections|] = output;
|
|
}
|