Open HadesFX opened 1 year ago
Try with th1z slightly modified version
# /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import zipfile
from sys import platform
import subprocess
print("[*] Checking Requirements Module....")
try:
from termcolor import colored
except ImportError:
os.system("pip install termcolor -q -q -q")
import termcolor
try:
import pyfiglet
except ImportError:
os.system("pip install pyfiglet -q -q -q")
import pyfiglet
def header():
ascii_banner = pyfiglet.figlet_format("{ZIP CRACKER}").upper()
print(colored(ascii_banner.rstrip("\n"), 'cyan', attrs=['bold']))
print(colored(" <Coded By: Clay> \n", 'yellow', attrs=['bold']))
print(colored(" <Modified By: zeroxd0d0e0a0d0b0e0e0f> \n", 'red', attrs=['bold']))
print(colored(" <Version: 2.1> \n", 'magenta', attrs=['bold']))
return
def linuxpdf():
os.system("clear")
header()
zip_filename = archive=subprocess.check_output('read -e -p "[*] Enter Path Of Your zip file: " var ; echo $var',shell=True).rstrip().decode('ascii')
if not os.path.exists(zip_filename):
print(colored("\n[ X ] File " + zip_filename + " was not found, Provide Valid FileName And Path!",
'red'))
exit()
print(colored("\n[*] Analyzing Zip File: ", 'blue'), zip_filename)
time.sleep(1)
if zip_filename[-3:] == "zip":
print(colored("\n[ ✔ ] Valid ZIP File Found...\n", 'green'))
else:
print(colored("\n[ X ] This is not a valid .zip file...\n", 'red'))
exit()
pwd_filename = wordlist=subprocess.check_output('read -e -p "[*] Enter Path Of Your Wordlist: " var ; echo $var',shell=True).rstrip().decode('ascii')
if not os.path.exists(pwd_filename):
print(colored("\n[ X ] File " + pwd_filename + " was not found, Provide Valid FileName And Path!",
'red'))
exit()
with open(pwd_filename, "rb") as passwords:
passwords_list = passwords.readlines()
total_passwords = len(passwords_list)
my_zip_file = zipfile.ZipFile(zip_filename)
for index, password in enumerate(passwords_list):
try:
my_zip_file.extractall(
path="Extracted Folder", pwd=password.strip())
print(
colored("\n{***********************SUCCESS***********************}", 'green'))
print(colored("[ ✔ ] ZIP FILE Password Found: ",
'cyan'), password.decode().strip())
break
except:
helo = round((index / total_passwords) * 100, 2)
if helo == '100%':
print(colored("[ X ] ALL ATTEMPTS FAILED", 'red'))
else:
print(
colored(f"[*] Trying password: {password.decode().strip()} ", 'green'))
continue
def winpdf():
os.system("cls")
header()
zip_filename = input(colored("Enter Path Of Your zip file: ", 'cyan'))
if not os.path.exists(zip_filename):
print(colored("\n[ X ] File " + zip_filename + " was not found, Provide Valid FileName And Path!",
'red'))
exit()
print(colored("\n[*] Analyzing Zip File: ", 'blue'), zip_filename)
time.sleep(2)
if zip_filename[-3:] == "zip":
print(colored("\n[ ✔ ] Valid ZIP File Found...", 'green'))
else:
print(colored("\n[ X ] This is not a valid .zip file...\n", 'red'))
exit()
pwd_filename = input(colored("\nEnter Path Of Your Wordlist: ", 'yellow'))
if not os.path.exists(pwd_filename):
print(colored("\n[ X ] File " + pwd_filename + " was not found, Provide Valid FileName And Path!",
'red'))
exit()
with open(pwd_filename, "rb") as passwords:
passwords_list = passwords.readlines()
total_passwords = len(passwords_list)
my_zip_file = zipfile.ZipFile(zip_filename)
for index, password in enumerate(passwords_list):
try:
my_zip_file.extractall(
path="Extracted Folder", pwd=password.strip())
print(
colored("\n{***********************SUCCESS***********************}", 'green'))
print(colored("[ ✔ ] ZIP FILE Password Found: ",
'cyan'), password.decode().strip())
break
except:
helo = round((index / total_passwords) * 100, 2)
if helo == '100%':
print(colored("[ X ] ALL ATTEMPTS FAILED", 'red'))
else:
print(
colored(f"[*] Trying password: {password.decode().strip()} ", 'green'))
continue
def catc():
try:
if platform == "linux" or platform == "linux2" or platform == "darwin":
linuxpdf()
elif platform == "win32":
winpdf()
except KeyboardInterrupt:
print(colored("\nYou Pressed The Exit Button!", 'red'))
quit()
catc()
when i try to use this tool , it can not work , env:Python 3.8.9
did you fix it? i have the same question...
when i try to use this tool , it can not work , env:Python 3.8.9