From df4dca36cbd936b16c15058e33880bbdf0b21794 Mon Sep 17 00:00:00 2001 From: craciu25yt <48807342+craciu25yt@users.noreply.github.com> Date: Wed, 28 Dec 2022 14:25:49 +1000 Subject: [PATCH] Add files via upload --- main.py | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 25 +++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 main.py create mode 100644 requirements.txt diff --git a/main.py b/main.py new file mode 100644 index 0000000..40586e0 --- /dev/null +++ b/main.py @@ -0,0 +1,70 @@ +import pyzipper + +import os +from datetime import datetime + +import tkinter as tk +from tkinter import filedialog +import threading +import time + +tries = 0 + +os.system("title ZiPCracker") +#Helpers +def cls(): + os.system("cls") + +def title(total): + while True: + os.system(f"title {tries}/{total}") + time.sleep(0.00001) +#Main +def crack(file, wordlist): + global tries + cls() + print("Loading Wordlist") + words = [] + + os.system("title Loading wordlist") + wordlistsize = 0 + startTime = datetime.now() + with open (wordlist.name, "r", encoding="latin-1") as f: + lines = f.readlines() + for line in lines: + line = line.replace("\n", "") + wordlistsize += 1 + words.append(line) + print(f"Word list loaded. Took: {(datetime.now() - startTime).total_seconds()}") + foldername = file.name.split("/")[-1] + foldername = foldername.split(".")[0] + x = threading.Thread(target=title, args=(str(wordlistsize),)) + x.start() + for word in words: + try: + with pyzipper.AESZipFile(file.name, "r") as z: + z.extractall(foldername, pwd=bytes(word, 'utf-8')) + except PermissionError: + print("I don't have permission to create a folder here!") + return + except: + tries += 1 + else: + print(f"The password was found. It is \"{word}\" and it was found at the try {tries}") + os.system(f"explorer \"{os.getcwd()}\\{foldername}\"") + return + print("The password was not found. Try using another wordlist") +root = tk.Tk() +root.withdraw() +print("What file do you want to crack") +file = filedialog.askopenfile(mode='r', title="Select a file to crack", initialdir=os.getcwdb(), filetypes=(("Zip file", ".zip"),)) +print(file) +print("Select your wordlist (If you don't have search for \"Rockyou\")") +wordlist = filedialog.askopenfile(mode='r', title="Wordlist", initialdir=os.getcwdb(), filetypes=(("Text files", ".txt"),)) +try: + crack(file, wordlist) + print("Program stopped") + os.system("pause >nul") +except KeyboardInterrupt: + print("leaving") + time.sleep(2) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ead65a7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,25 @@ +certifi==2022.12.7 +cffi==1.15.1 +charset-normalizer==2.1.1 +colorama==0.4.6 +cryptography==38.0.4 +idna==3.4 +mouse==0.7.1 +numpy==1.23.5 +pandas==1.5.2 +psutil==5.9.4 +pycparser==2.21 +pycryptodomex==3.16.0 +pynput==1.7.6 +pyOpenSSL==22.1.0 +pypiwin32==223 +python-dateutil==2.8.2 +pytz==2022.6 +pywin32==305 +pyzipper==0.3.6 +requests==2.28.1 +six==1.16.0 +tqdm==4.64.1 +urllib3==1.26.13 +websockets==10.4 +win10toast==0.9