Fixed IP handling in input

This commit is contained in:
Benjamyn Love 2017-07-26 18:05:23 +10:00
parent 483d03a542
commit bb16df4156

View File

@ -47,6 +47,16 @@ def compareSOA(inNameservers, inDomain, origSOA):
#print soaRecords
def checkIfIP(in1):
count = 0
for dom in in1:
if dom.isdigit():
count += 1
else:
return 0
if count == 4:
return 1
def checkPhrase(inputs):
for word in phrases:
@ -139,13 +149,15 @@ while running == 1:
pass
else:
if len(partDomain) == 4:
print "========================================================"
ipLookup(inInput)
if pingOn == "P":
if checkIfIP(partDomain):
print "========================================================"
ipPing(inInput)
else:
pass
ipLookup(inInput)
if pingOn == "P":
print "========================================================"
ipPing(inInput)
else:
pass
else:
if whoOn == "W":
whois(inInput)