Skip to content

Instantly share code, notes, and snippets.

@mavam
Created November 2, 2012 22:50
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/4004842 to your computer and use it in GitHub Desktop.
Save mavam/4004842 to your computer and use it in GitHub Desktop.
DNS TXT lookup in Bro using the function lookup_hostname_txt
event x509_certificate(c: connection, is_orig: bool, cert: X509, chain_idx: count, chain_len: count, der_cert: string)
{
local domain = "%s.notary.icsi.berkeley.edu";
when ( local str = lookup_hostname_txt(fmt(domain, sha1_hash(der_cert))) )
{
print str;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment