tools

- collection of tools for supernets sysadmins
git clone git://git.acid.vegas/tools.git
Log | Files | Refs | Archive

altdns.py (382B)

      1 #!/usr/bin/env python
      2 import socket
      3 
      4 dns = (
      5 	'irc.hardchats.net',
      6 	'irc.ngr.bz',
      7 	'irc.wepump.in',
      8 	'irc.autist.life'
      9 )
     10 
     11 servers = set([i[4][0] for i in socket.getaddrinfo('irc.supernets.org', 6667)])
     12 for hostname in dns:
     13 	try:
     14 		if socket.gethostbyname(hostname) in servers:
     15 			print('GOOD\t' + hostname)
     16 		else:
     17 			print('BAD \t' + hostname)
     18 	except:
     19 		print('BAD \t' + hostname)