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
|
||||
|
||||
def lookup(ip):
|
||||
net = Net(ip)
|
||||
obj = IPASN(net)
|
||||
results = obj.lookup()
|
||||
pprint(results)
|
||||
for key,value in results.iteritems():
|
||||
if key == "asn_country_code":
|
||||
print(value)
|
||||
if key == "asn_cidr":
|
||||
print(value)
|
||||
|
||||
try:
|
||||
net = Net(ip)
|
||||
obj = IPASN(net)
|
||||
results = obj.lookup()
|
||||
pprint(results)
|
||||
for key,value in results.iteritems():
|
||||
if key == "asn_country_code":
|
||||
print(value)
|
||||
if key == "asn_cidr":
|
||||
print(value)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
ipListFile = openFile("iplist.txt")
|
||||
ipList = ipListFile.read()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user