This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

parallelcracker

By: anuvab1911 on Mar 20th, 2013  |  syntax: Python  |  size: 0.70 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import multiprocessing
  2. import hashlib
  3. import time
  4. oldTime = time.time()
  5. def cracker(start,end,checkStr):
  6.     curStr = start
  7.     while curStr != end:
  8.         digest = hashlib.sha1()
  9.         digest.update(str(curStr))
  10.         if checkStr == digest.hexdigest():
  11.             print "Match found at " + str(curStr)
  12.             newTime = time.time()
  13.             print (newTime - oldTime)
  14.         curStr += 1
  15. if __name__ == '__main__':
  16.     procs = []
  17.     j = 0
  18.     for i in range(8):
  19.         p = multiprocessing.Process(target = cracker,args = (j,j*10000,"a0849622401ebc624406648bc39eca144427cd90"))
  20.         j = j*10000 + 1
  21.         procs.append(p)
  22.         p.start()
  23.     for p in procs:
  24.         p.join()
clone this paste RAW Paste Data