Skip to content

Instantly share code, notes, and snippets.

@mavam
Created November 2, 2012 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mavam/4004865 to your computer and use it in GitHub Desktop.
Save mavam/4004865 to your computer and use it in GitHub Desktop.
DNS lookup in Bro using the when statement
when (local result = lookup_addr("www.bro-ids.org"))
{
for (addr in result)
print addr;
}
@jbaggs
Copy link

jbaggs commented Jun 19, 2018

The lookup_addr function takes an ip address as its argument, and performs a reverse-dns lookup. The function used here should be lookup_hostname.

https://www.bro.org/sphinx/scripts/base/bif/bro.bif.bro.html#id-lookup_hostname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment