fixed some py3 errors
This commit is contained in:
parent
e7a149781e
commit
2057d2a3fd
Binary file not shown.
BIN
libs/cc.pyc
BIN
libs/cc.pyc
Binary file not shown.
BIN
libs/colours.pyc
BIN
libs/colours.pyc
Binary file not shown.
BIN
libs/config.pyc
BIN
libs/config.pyc
Binary file not shown.
BIN
libs/files.pyc
BIN
libs/files.pyc
Binary file not shown.
35
main.py
35
main.py
@ -123,22 +123,25 @@ def lookupDomain(inData):
|
||||
subLookup(inData, subs)
|
||||
|
||||
def lookupIP(inData):
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=UserWarning)
|
||||
ipnet = Net(inData)
|
||||
ipobj = IPASN(ipnet)
|
||||
results = ipobj.lookup()
|
||||
for types in ipData:
|
||||
if types == "asn_country_code":
|
||||
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, CountryDict[results[types]], colour_default))
|
||||
else:
|
||||
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, results[types], colour_default))
|
||||
rev_name = reversename.from_address(inData)
|
||||
try:
|
||||
reverseName = str(dns.resolver.query(rev_name, "PTR")[0])
|
||||
except Exception as E:
|
||||
reverseName = E
|
||||
print('\n' + indent + '%sPTR:%s\t\t%s%s' % (colour_pretty, colour_good, reverseName, colour_default))
|
||||
try:
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=UserWarning)
|
||||
ipnet = Net(inData)
|
||||
ipobj = IPASN(ipnet)
|
||||
results = ipobj.lookup()
|
||||
for types in ipData:
|
||||
if types == "asn_country_code":
|
||||
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, CountryDict[results[types]], colour_default))
|
||||
else:
|
||||
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, results[types], colour_default))
|
||||
rev_name = reversename.from_address(inData)
|
||||
try:
|
||||
reverseName = str(dns.resolver.query(rev_name, "PTR")[0])
|
||||
except Exception as E:
|
||||
reverseName = E
|
||||
print('\n' + indent + '%sPTR:%s\t\t%s%s' % (colour_pretty, colour_good, reverseName, colour_default))
|
||||
except:
|
||||
None
|
||||
|
||||
# Taken and modified from DNSpy 1, I am not asahmed it works
|
||||
def checkIfIP(in1):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user