diff --git a/HTTPy.py b/HTTPy.py index f90e04c..b1a5c17 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -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)