Created
February 29, 2016 12:42
-
-
Save azuax/603f2c6f988e5550d708 to your computer and use it in GitHub Desktop.
Script simple para crackear un zip protegido con contraseña utilizando un diccionario de datos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import zipfile | |
parser = argparse.ArgumentParser(prog='Dictionary Zip Cracker') | |
parser.add_argument('-f', '--file', help='Ruta del archivo diccionario', required=True) | |
parser.add_argument('-z', '--zipfile', help='Ruta del archivo comprimido', required=True) | |
values = parser.parse_args() | |
zip_file = zipfile.ZipFile(values.zipfile, 'r') | |
with open(values.file, 'r') as f: | |
for line in f: | |
try: | |
password = line.strip() | |
zip_file.extractall(pwd=password) | |
print u'La contraseña es: %s' % password | |
exit(0) | |
except Exception as e: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment