import multiprocessing
import hashlib
import time
oldTime = time.time()
def cracker(start,end,checkStr):
curStr = start
while curStr != end:
digest = hashlib.sha1()
digest.update(str(curStr))
if checkStr == digest.hexdigest():
print "Match found at " + str(curStr)
newTime = time.time()
print (newTime - oldTime)
curStr += 1
if __name__ == '__main__':
procs = []
j = 0
for i in range(8):
p = multiprocessing.Process(target = cracker,args = (j,j*10000,"a0849622401ebc624406648bc39eca144427cd90"))
j = j*10000 + 1
procs.append(p)
p.start()
for p in procs:
p.join()