Fixed whois info being fucked
This commit is contained in:
parent
84b909e7cb
commit
c880477724
19
main.py
19
main.py
@ -7,12 +7,10 @@ import json
|
||||
from pprint import pprint
|
||||
from libs import config
|
||||
|
||||
running = 0
|
||||
prompt = '$ '
|
||||
running = 1
|
||||
prompt = ': '
|
||||
indent = '~ '
|
||||
whoisrecs = ["NotFound", "DomainName", "Registrar", "Status", "UpdatedDate", "CreationDate", "ExpirationDate", "RegistrantName", "EligibilityName", "Eligibilitytype", "NameServer"]
|
||||
subdomains = ["www", "mail", "ftp"]
|
||||
dnsrecords = ["A", "MX", "TXT", "NS", "SOA"]
|
||||
|
||||
def domainWhois(inData):
|
||||
whoisData = whois.whois(inData).query()
|
||||
@ -23,10 +21,10 @@ def signal_handler(singal, frame):
|
||||
quit()
|
||||
|
||||
def printWhois(resultData):
|
||||
for x in range(0, len(whoisrecs)):
|
||||
try:
|
||||
for recType in whoisrecs:
|
||||
for item in resultData[recType]:
|
||||
print(indent + '%s: %s' % (recType, item))
|
||||
for item in resultData[whoisrecs[x]]:
|
||||
print(indent + '%s: %s' % (whoisrecs[x], item))
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
@ -44,7 +42,10 @@ def parseInput(inData):
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
jsonData = config.readConf()
|
||||
pprint(jsonData)
|
||||
#pprint(jsonData)
|
||||
subdomains = jsonData["subdomains"]
|
||||
dnsrecords = jsonData["dnsrecords"]
|
||||
|
||||
|
||||
print "root"
|
||||
for rdata in dns.resolver.query('yahoo.com', 'A') :
|
||||
@ -58,4 +59,4 @@ for sub in subdomains:
|
||||
pass
|
||||
|
||||
while running == 1:
|
||||
parseInput(raw_input("Please Enter a domain" + prompt) )
|
||||
parseInput(raw_input("\nPlease Enter a domain" + prompt) )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user