Tuesday 19 April 2011

certlookup

Last week I was performing a network assessment; when I was trying to identify the DNS names behind a few IPs I wrote this little script to retrieve domain names thorugh the CommonName of a SSL certificate:

Usage: certlookup.py [--help] [--verbose] -h <ip> [-i=$in] [-p <port>] [--mtree=$out]

Examples:
    $ python certlookup.py -h 69.58.181.89
    www.verisign.com (69.58.181.89)

    $ echo -e "69.58.181.89\t443" > /tmp/a
    $ python certlookup.py -i /tmp/a
    www.verisign.com (69.58.181.89)

MagicTree integration:
    certlookup.py -i=$i --mtree=$out

    The input file must be a list of: ip<TAB>port

May be it is useful for someone else! You can download it from: http://code.google.com/p/pysqlin/downloads/list


It should be noted that this functionality can be found in complete framework discovery tools like hostmap or Yeti.

No comments:

Post a Comment