Interesting tip from Robert on Stack Overflow today showed me that there is a nifty little word file built into most Unix based systems (including OSX).
(yep, probably old news to *nix gurus, but for a lifetime Windows guy who only made the switch six months ago this was yet another nice surprise).
The list is here: /usr/share/dict/words
(I have a teammate who has a habit of putting simple passwords on zip files and forgetting to share them with the team).
import sys import zipfile file_name = "test.zip" password_file_path = '/usr/share/dict/words' zipped_file = zipfile.ZipFile(file_name) password_file = open(password_file_path) for password_guess in password_file.readlines(): try: zipped_file.extractall(pwd=password_guess.strip()) print '\n[+] Pass: ' + password_guess.strip() + '\n' exit(0) except Exception, e: sys.stdout.write('.') sys.stdout.flush()
Nice one funnyman 🙂