Simple threading implementaion, no idea if this works yet
This commit is contained in:
parent
5ce4880ad4
commit
28a7f6acc6
8
main.py
8
main.py
@ -1,4 +1,5 @@
|
||||
import os
|
||||
import threading
|
||||
from ipwhois.net import Net
|
||||
from ipwhois.asn import IPASN
|
||||
from pprint import pprint
|
||||
@ -7,6 +8,9 @@ tmpips = [] #NOTE Need to reset this variable between runs
|
||||
ips = []
|
||||
ipdict = {}
|
||||
|
||||
class threadedLookup(threading.Thread):
|
||||
def run(self, ip):
|
||||
lookup(ip)
|
||||
|
||||
def openFile(filename):
|
||||
try:
|
||||
@ -48,7 +52,9 @@ for x in tmpips:
|
||||
ips.append(y)
|
||||
for value in ips:
|
||||
if "." in value:
|
||||
lookup(value)
|
||||
#lookup(value)
|
||||
lookupThread = threadedLookup(name = "lookup" + value)
|
||||
lookupThread.start()
|
||||
|
||||
#pprint(ipdict)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user