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)
|
subLookup(inData, subs)
|
||||||
|
|
||||||
def lookupIP(inData):
|
def lookupIP(inData):
|
||||||
with warnings.catch_warnings():
|
try:
|
||||||
warnings.filterwarnings("ignore", category=UserWarning)
|
with warnings.catch_warnings():
|
||||||
ipnet = Net(inData)
|
warnings.filterwarnings("ignore", category=UserWarning)
|
||||||
ipobj = IPASN(ipnet)
|
ipnet = Net(inData)
|
||||||
results = ipobj.lookup()
|
ipobj = IPASN(ipnet)
|
||||||
for types in ipData:
|
results = ipobj.lookup()
|
||||||
if types == "asn_country_code":
|
for types in ipData:
|
||||||
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, CountryDict[results[types]], colour_default))
|
if types == "asn_country_code":
|
||||||
else:
|
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, CountryDict[results[types]], colour_default))
|
||||||
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, results[types], colour_default))
|
else:
|
||||||
rev_name = reversename.from_address(inData)
|
print(indent + "%s%s:%s\t%s%s" % (colour_pretty, ipData[types], colour_good, results[types], colour_default))
|
||||||
try:
|
rev_name = reversename.from_address(inData)
|
||||||
reverseName = str(dns.resolver.query(rev_name, "PTR")[0])
|
try:
|
||||||
except Exception as E:
|
reverseName = str(dns.resolver.query(rev_name, "PTR")[0])
|
||||||
reverseName = E
|
except Exception as E:
|
||||||
print('\n' + indent + '%sPTR:%s\t\t%s%s' % (colour_pretty, colour_good, reverseName, colour_default))
|
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
|
# Taken and modified from DNSpy 1, I am not asahmed it works
|
||||||
def checkIfIP(in1):
|
def checkIfIP(in1):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user