Advertisement
Guest User

Untitled

a guest
Dec 30th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. import zipfile
  2.  
  3.  
  4. def main():
  5.     zipfilename = '1.zip'
  6.     dictionary = 'dictionary.txt'
  7.  
  8.     password = None
  9.     zip_file = zipfile.ZipFile(zipfilename)
  10.     with open(dictionary, 'r') as f:
  11.         for line in f.readlines():
  12.             password = line.strip('\n')
  13.             try:
  14.                 zip_file.extractall(pwd=password)
  15.                 password = 'Password found: %s' % password
  16.             except:
  17.                 print("Failed " + password)
  18.                 pass
  19.     print (password)
  20.  
  21. if __name__ == '__main__':
  22.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement