This commit is contained in:
Benjamyn Love 2018-02-20 09:07:35 +11:00
parent 96df21c047
commit 9d6c447ac9

View File

@ -7,10 +7,12 @@ from pprint import pprint
tmpips = [] #NOTE Need to reset this variable between runs tmpips = [] #NOTE Need to reset this variable between runs
ips = [] ips = []
ipdict = {} ipdict = {}
currValue = ""
class threadedLookup(threading.Thread): class threadedLookup(threading.Thread):
def run(self, ip): def run(self):
lookup(ip) global currValue
lookup(currValue)
def openFile(filename): def openFile(filename):
try: try:
@ -53,7 +55,8 @@ for x in tmpips:
for value in ips: for value in ips:
if "." in value: if "." in value:
#lookup(value) #lookup(value)
lookupThread = threadedLookup(name = "lookup" + value, value) currValue = value
lookupThread = threadedLookup(name = "lookup" + value)
lookupThread.start() lookupThread.start()
#pprint(ipdict) #pprint(ipdict)