Fixed
This commit is contained in:
parent
6fca113ea3
commit
873283e72d
22
main.py
22
main.py
@ -19,16 +19,18 @@ def splitLine(fileline):
|
|||||||
return tmpline
|
return tmpline
|
||||||
|
|
||||||
def lookup(ip):
|
def lookup(ip):
|
||||||
net = Net(ip)
|
try:
|
||||||
obj = IPASN(net)
|
net = Net(ip)
|
||||||
results = obj.lookup()
|
obj = IPASN(net)
|
||||||
pprint(results)
|
results = obj.lookup()
|
||||||
for key,value in results.iteritems():
|
pprint(results)
|
||||||
if key == "asn_country_code":
|
for key,value in results.iteritems():
|
||||||
print(value)
|
if key == "asn_country_code":
|
||||||
if key == "asn_cidr":
|
print(value)
|
||||||
print(value)
|
if key == "asn_cidr":
|
||||||
|
print(value)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
ipListFile = openFile("iplist.txt")
|
ipListFile = openFile("iplist.txt")
|
||||||
ipList = ipListFile.read()
|
ipList = ipListFile.read()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user