June 06, 2017

Domain Suffix Search - Cisco Option 119

#!/usr/bin/python
import sys
hexlist = []
for domain in sys.argv[1:]:
    for part in domain.split("."):
        hexlist.append("%02x" % len(part))
        for c in part:
            hexlist.append(c.encode("hex"))
    hexlist.append("00")
print "".join([(".%s" % (x) if i and not i % 2 else x) \
    for i, x in enumerate(hexlist)])


root@control:/home/billw# ./ios-search.py wjw.local wjw.nz
0377.6a77.056c.6f63.616c.0003.776a.7702.6e7a.00


ip dhcp pool inside
 network 192.168.1.0 255.255.255.0
 update dns override
 dns-server 192.168.1.24 192.168.1.14 
 domain-name wjw.local
 default-router 192.168.1.1 
 option 119 hex 0377.6a77.056c.6f63.616c.0003.776a.7702.6e7a.00

No comments: