Skip to content

Instantly share code, notes, and snippets.

@Gavriel770U
Created August 6, 2024 21:18
Show Gist options
  • Save Gavriel770U/5a8f38ee282090da793858e4d7d5caca to your computer and use it in GitHub Desktop.
Save Gavriel770U/5a8f38ee282090da793858e4d7d5caca to your computer and use it in GitHub Desktop.
Zip Password Bruteforcer For Magshimim+ Summer Camp 2024 CTF
from zipfile import ZipFile
file_name = "password.zip"
with ZipFile(file_name, "r") as zip:
for pwd in range(1000,10000):
try:
zip.extractall(path="uncompressed", pwd=(str(pwd)).encode("utf-8"))
print(pwd)
print("SUCCESS")
break
except BaseException:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment