Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 2nd, 2013  |  syntax: None  |  size: 0.64 KB  |  views: 33  |  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 zipfile
  2. from threading import Thread
  3.  
  4. def extractFile(zfile, password):
  5.         try:   
  6.                
  7.                 zfile.extractall(pwd=password)
  8.                 print '[+] Password = ' + password + '\n'
  9.                 exit(0)                
  10.         except Exception, e:
  11.                 pass
  12.  
  13. def main():
  14.         zFile = zipfile.ZipFile("evil2.zip")
  15.         passFile = open('dictionary.txt')
  16.         for line in passFile.readlines():
  17.                 password = line.strip('\n')
  18.                 #guess = extractFile(zFile, password)
  19.                 #if guess:
  20.                 #       print '[+] Password = ' + password + '\n'
  21.                 #       exit(0)
  22.                 t = Thread(target = extractFile, args = (zFile, password))
  23.                 t.start()
  24.                
  25. if __name__ == '__main__':
  26.         main()