Finally, here we go into the final code when the attack happen. In the code above, I also read all wordlist to know how many word will be used in the brute force attack. try: zip_file = zipfile.ZipFile(protected_file) n_pass = len(list(open(wordlist, "rb"))) except: print("\a") print("File not zip, exiting.") exit(0) If the program is a ZIP the code will run and if not the code will stop. After wordlist created, we need to check is the program is a ZIP file or not. I save the above wordlist as my_wordlist.txt. scooter richard soccer rachel purple password melissa jackson angela arsenal 222222. You can built manually, just save your file as. Wordlist is a collection of text that usually used in brute force attack. protected_file = input("Zip file: ") wordlist = input("Choose wordlist: ") Next we will ask the user to input the zip file name and the wordlist for doing the dictionary attack. In case you are not yet install that two modules just run this in your terminal. Okay, our protected file is ready, let’s go into the code section Code Sectionīefore all, this will use zipfile module for doing the brute force attack and tqdm modules for built a progress bar to make the attack more realistic.
0 Comments
Leave a Reply. |