Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
craciu25yt authored Dec 28, 2022
1 parent 6bc2697 commit df4dca3
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
70 changes: 70 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -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)
25 changes: 25 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit df4dca3

Please sign in to comment.