commit da51753f22120168a053e36f26bb055fccddbb53 Author: Marius Pana Date: Sun Feb 1 13:29:22 2015 +0200 initial commit just getting started diff --git a/check_extended_dns.py b/check_extended_dns.py new file mode 100755 index 0000000..d2b8d14 --- /dev/null +++ b/check_extended_dns.py @@ -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] \ No newline at end of file