Added extremely basic validation

This commit is contained in:
Benjamyn Love 2018-03-17 22:01:12 +11:00
parent db30f02ffe
commit 8727e66ffb
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ {
"subdomains":["www", "mail", "ftp"], "subdomains":["www", "mail", "ftp"],
"dnsrecords":["A", "MX", "TXT", "NS", "SOA"] "dnsrecords":["A", "AAAA", "MX", "TXT", "NS", "SOA"]
} }

View File

@ -29,9 +29,14 @@ def printWhois(resultData):
pass pass
def parseInput(inData): def parseInput(inData):
if inData.lower() == "quit": tmpInData = inData.lower()
if tmpInData == "quit":
quit() quit()
try:
result = domainWhois(inData) result = domainWhois(inData)
except Exception as E:
print('%s : TLD most likely needs configuring' % (E))
result = "Error"
print("\nWhos Info") print("\nWhos Info")
printWhois(result) printWhois(result)
print("\nDNS Records") print("\nDNS Records")