From 8727e66ffbb199e45689ea41ef2db67b543c07b4 Mon Sep 17 00:00:00 2001 From: Benjamyn Love Date: Sat, 17 Mar 2018 22:01:12 +1100 Subject: [PATCH] Added extremely basic validation --- config.json | 2 +- main.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 4b5df9a..b626256 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,4 @@ { "subdomains":["www", "mail", "ftp"], - "dnsrecords":["A", "MX", "TXT", "NS", "SOA"] + "dnsrecords":["A", "AAAA", "MX", "TXT", "NS", "SOA"] } diff --git a/main.py b/main.py index fd4bee1..8c134f5 100755 --- a/main.py +++ b/main.py @@ -29,9 +29,14 @@ def printWhois(resultData): pass def parseInput(inData): - if inData.lower() == "quit": + tmpInData = inData.lower() + if tmpInData == "quit": quit() - result = domainWhois(inData) + try: + result = domainWhois(inData) + except Exception as E: + print('%s : TLD most likely needs configuring' % (E)) + result = "Error" print("\nWhos Info") printWhois(result) print("\nDNS Records")