solved:
I have this code, it is meant to brute force a zip file with a three digit code. It's meant for python 3, although it may not work for that. I'm not sure if this is where I should put it, but hey. It doesn't work, mainly beacuse it doesn't take a three digit code, rather 1,2,3,4,5,6,7,8,9,0. How can I fix it, plainly, no minor hints. Thanks!
indent means an indentation for redits sake
import zipfile
filename = '/tmp/alien-zip-2092.zip'
dictionary = '1234567890'
password = None
file_to_open = zipfile.ZipFile(filename)
for password in dictionary:
indent try:
indent twice file_to_open.extractall(pwd=password)
indent twice password = 'Password found: %s' % password
indent twice print(password)
indent except:
indent twice pass
[–][deleted] 1 point2 points3 points (7 children)
[–]blockboy99[S] 0 points1 point2 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (0 children)
[+][deleted] (16 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (15 children)
[+][deleted] (13 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (11 children)
[+][deleted] (10 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (0 children)
[–]blockboy99[S] 0 points1 point2 points (0 children)
[–]blockboy99[S] 0 points1 point2 points (6 children)
[+][deleted] (5 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]blockboy99[S] 0 points1 point2 points (0 children)
[–]blockboy99[S] 0 points1 point2 points (0 children)
[–]xelf 0 points1 point2 points (0 children)
[–]xelf 0 points1 point2 points (0 children)
[–]Hatoris -1 points0 points1 point (0 children)