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

- When ACTION_EMAIL_ADMIN_ORIG or ACTION_EMAIL_ADMIN_RESP is applied to a notice, the email addresses associated with the address are collected from the new local_admins table and the email is sent to all discovered email addresses. - The site.bro script is now in the Site module. - Some other small cleanup.
21 lines
654 B
Text
21 lines
654 B
Text
@load site
|
|
|
|
type Direction: enum { INBOUND, OUTBOUND, BIDIRECTIONAL, NO_DIRECTION };
|
|
function id_matches_direction(id: conn_id, d: Direction): bool
|
|
{
|
|
if ( d == NO_DIRECTION ) return F;
|
|
|
|
return ( d == BIDIRECTIONAL ||
|
|
(d == OUTBOUND && Site::is_local_addr(id$orig_h)) ||
|
|
(d == INBOUND && Site::is_local_addr(id$resp_h)) );
|
|
}
|
|
|
|
type Host: enum { LOCAL_HOSTS, REMOTE_HOSTS, ALL_HOSTS, NO_HOSTS };
|
|
function addr_matches_host(ip: addr, h: Host): bool
|
|
{
|
|
if ( h == NO_HOSTS ) return F;
|
|
|
|
return ( h == ALL_HOSTS ||
|
|
(h == LOCAL_HOSTS && Site::is_local_addr(ip)) ||
|
|
(h == REMOTE_HOSTS && !Site::is_local_addr(ip)) );
|
|
}
|