Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not work #1

Open
HadesFX opened this issue Nov 30, 2022 · 2 comments
Open

can not work #1

HadesFX opened this issue Nov 30, 2022 · 2 comments

Comments

@HadesFX
Copy link

HadesFX commented Nov 30, 2022

image
when i try to use this tool , it can not work , env:Python 3.8.9

@zeroxd0d0e0a0d0b0e0e0f
Copy link

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()

@QtidusQ
Copy link

QtidusQ commented Dec 23, 2023

image 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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants