initial commit
just getting started
This commit is contained in:
commit
da51753f22
18
check_extended_dns.py
Executable file
18
check_extended_dns.py
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import pythonwhois
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description='Check whois and dns information.')
|
||||||
|
parser.add_argument('--domain', nargs=1, required=True, help='the domain name')
|
||||||
|
parser.add_argument('--nameserver', nargs='*', help='a space delimited list of nameservers')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
try:
|
||||||
|
domain = pythonwhois.get_whois(args.domain[0])
|
||||||
|
|
||||||
|
except:
|
||||||
|
#something happened, raise an erro
|
||||||
|
print "3 Unexpected error: ", sys.exc_info()[0]
|
Loading…
Reference in New Issue
Block a user