The code and updates can be found in my GitHub repository. Some of my next steps will be to add better reporting about the contents and cracking status, as well as maybe looking into threading or support for other file types. When I went back to the directory, I found the file that I originally hid in the archive. With everything in place, I grabbed a password list and fired the script up. In this case, it prints out the cracked password as well as how many password attempts per second it performed (for statistical purposes). If the program throws no exceptions, then it means the archive was successfully extracted (which means the password was found). This opens up the specified zip file (in this case, secret.zip), and attempts to extract it using each password in the provided wordlist one by one. Print "%i password attempts per second." % (pass_count/totalTime)Įlif 'Error -3 while decompressing' in str(e): Print "\nPassword cracked: %s\n" % password Print " There was an error opening your zip file." With the zip file in place, I created the following Python script. This may be useful for those who have lost the password to their zip files or who have zip files that are password protected. When I attempted to open this file, it prompted me for a password. With that in mind, I figured this would be a good exercise and another useful tool for my arsenal.įirst things first, I had to create my password protected zip file. I haven’t read through Violent Python yet, but I know that this is one of the examples from it. Brute-force cracking takes months-to-years assuming: A) The password is of sufficient length and complexity. Since I had never tried to write a zip password cracker, I figured it was about time. That's a pretty naive statement, so let me clarify.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |