def crack_zip_password(zipfile_path, password):
try:
with zipfile.ZipFile(zipfile_path) as zip_ref:
zip_ref.extractall(pwd=password.encode())
return True
except Exception as e:
print(e)
return False
zipfile_path = input("Please enter the path to the zip file: ")
password_list = input("Please enter the password list: ")
with open(password_list, 'r') as file:
passwords = file.readlines()
passwords = [password.strip() for password in passwords]
for password in passwords:
if crack_zip_password(zipfile_path, password):
print(f"Password successfully cracked. The password was '{password}'.")
break
else:
print("Failed to crack the password.")
import zipfile
Made By LoopGpt
def crack_zip_password(zipfile_path, password): try: with zipfile.ZipFile(zipfile_path) as zip_ref: zip_ref.extractall(pwd=password.encode()) return True except Exception as e: print(e) return False
zipfile_path = input("Please enter the path to the zip file: ")
password_list = input("Please enter the password list: ")
with open(password_list, 'r') as file: passwords = file.readlines()
passwords = [password.strip() for password in passwords]
for password in passwords: if crack_zip_password(zipfile_path, password): print(f"Password successfully cracked. The password was '{password}'.") break else: print("Failed to crack the password.")