![]() |
|
Tutorial How to make zip password bruteforcer - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Python (https://sinister.ly/Forum-Python) +--- Thread: Tutorial How to make zip password bruteforcer (/Thread-Tutorial-How-to-make-zip-password-bruteforcer) |
How to make zip password bruteforcer - tortilla - 05-06-2014 Hey, have you ever found encrypted zip that you really wanted open, but you had no password? Well, this tutorial is just for you. We will learn how to code our own simple zip password bruteforcer. (Sorry for my bad English, I know I should learn it better...) At begin of our script, there should be shellbang line. That line will tell system that our script should be run in python. Code: #!/usr/bin/env pythonNow we have to import libraries. We will import zipfile (so we can work with zip files) and sys. Code: import zipfile, sysOur script should now load zip file from specific path. We will get path dynamically, as script argument. Also, we should handle potential error when user don't specify path to zip file. Code: try:
zFile = zipfile.ZipFile(sys.argv[1])
except:
print "[-] Zipfile not found."
print "Usage: " + sys.argv[0] + " unzipMe.zip wordlist.lst"
sys.exit()Second part (starting with except) will run only if code in try section fails. That's why we print error here. sys.exit() will stop script. Now should our script load wordlist file, specified as second argument. Code: try:
fWordlist = open(sys.argv[2], 'r')
except:
print "[-] Wordlist not found"
print "Usage: " + sys.argv[0] + " unzipMe.zip wordlist.lst"
sys.exit()It's time to read all passwords from loaded wordlist file. Code: passlist = fWordlist.readlines()Now, when we have all things ready, is time to finally start brute-forcing our zip file. We will remove all unwanted characters from each password (as \n standing for new line in UNIX-like systems) and then proceed to trying to open zip file with it. Code: for pwd in passlist:
pwd = pwd.strip()
try:
zFile.extractall(pwd=pwd)
print "[+] Found password: " + pwd
except:
print "[-] Wrong password: " + pwdThat's all. We have coded our first zip password bruteforcer. You can find whole script here. RE: How to make zip password bruteforcer - IcanFLY - 05-06-2014 >wordlist >wordlist >wordlist >wordlist >bruteforcing >wordlist >wordlist >...
RE: How to make zip password bruteforcer - 3SidedSquare - 05-06-2014 (05-06-2014, 09:31 PM)IcanFLY Wrote: >wordlistHey now, be nice, a word list can beat a brute forcer. Besides, his English is obviously bad, he doesn't know the difference between "brute force" and "dictionary" RE: How to make zip password bruteforcer - superMAUS - 05-06-2014 (05-06-2014, 09:31 PM)IcanFLY Wrote: >wordlist Most people on the internet now a days think that bruteforcing == wordlist & dictionary attack == actual dictionary. Whatever terminology you use it doesnt matter. Nice work op, a good tutorial. CURSE ANYONE WHO USES ZIPDOUGH! TAR! TAR! RE: How to make zip password bruteforcer - Equinox - 05-07-2014 This is a good tutorial, however, this isn't really a bruteforcer. But this is; Code: import string,itertools
#Programmed by Duubz
#https://www.sinister.ly/User-Duubz
#SInisterly - The world #1 tech forum
def brute():
length = 1
charmap = string.printable
while 1:
try:
x = itertools.permutations(charmap, int(length))
for w in x:
print( ''.join(w) )
except: pass
length += 1
if __name__ == '__main__':
brute()RE: How to make zip password bruteforcer - Mushroom Face - 05-07-2014 (05-06-2014, 10:41 PM)vegimite Wrote: Most people on the internet now a days think that bruteforcing == wordlist & dictionary attack == actual dictionary. Whatever terminology you use it doesnt matter. You sir, are a genius. I couldn't of said the exact thing any better. However you should of mentioned that a brute_Force_Attack != dictionary_Decipher_Attack. The double equals introduces the mind into reading something as it is true no matter what. Surprisingly our neurons sometimes run on the same 1s & 0 binary concept. You'll learn that once you study basic artificial intelligence. Nice tutorial, however you could have worked on your English slightly. I give you kudos for not being a native English speaker though. RE: How to make zip password bruteforcer - cr33pyguy - 05-07-2014 Nice tutorial, I love how well you explained each step. Please do make more tutorials. RE: How to make zip password bruteforcer - Null_Byte - 08-26-2014 Good tutorial :3 like it was stated before...people really should use tar D: How to make zip password bruteforcer - Adorapuff - 08-26-2014 Just remember, if you get it off youtube and there is a pass with a survey link, it's probably fake. RE: How to make zip password bruteforcer - Left - 08-26-2014 Great tutorial! I will use this. |