SHARE
TWEET

zCrack

a guest May 6th, 2014 15 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. import zipfile, sys
  3.  
  4. #load zip file
  5. try:
  6.         zFile = zipfile.ZipFile(sys.argv[1])
  7. except:
  8.         print "[-] Zipfile not found."
  9.         print "Usage: " + sys.argv[0] + " unzipMe.zip wordlist.lst"
  10.         sys.exit()
  11.  
  12. #load wordlist
  13. try:
  14.         fWordlist = open(sys.argv[2], 'r')
  15. except:
  16.         print "[-] Wordlist not found"
  17.         print "Usage: " + sys.argv[0] + " unzipMe.zip wordlist.lst"
  18.         sys.exit()
  19.  
  20. #read wordlist
  21. passlist = fWordlist.readlines()
  22.  
  23. #bruteforce zip
  24. for pwd in passlist:
  25.         pwd = pwd.strip()
  26.         try:
  27.                 zFile.extractall(pwd=pwd)
  28.                 print "[+] Found password: " + pwd
  29.         except:
  30.                 print "[-] Wrong password: " + pwd
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top