Skip to content

Instantly share code, notes, and snippets.

@rainiera
Created May 4, 2018 05:05
Show Gist options
  • Save rainiera/8721f11bfd14afba199212268fc7cba2 to your computer and use it in GitHub Desktop.
Save rainiera/8721f11bfd14afba199212268fc7cba2 to your computer and use it in GitHub Desktop.
with ZipFile('files.zip') as zf:
with open('probable-v2-top12000.txt', 'r') as rhandle:
pws = rhandle.read().splitlines()
for pw in pws:
try:
zf.extractall(pwd=bytes(pw,'utf-8'))
print('SUCCESS WITH {}'.format(pw))
import sys; sys.exit(0)
except Exception as e:
print(str(e))
print('unsuccessful attempt with {}'.format(pw))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment