Great god should know zipfile this built-in module,
I set up a password zip, python directly identify and install the source code can be cracked,
Network I download zip, tip me directly the file it is not a zip file,
The only difference is I zip file, open will show what's inside, and then extract the need password,
I downloaded from the Internet, open out a window that allows you to enter a password, you are not ripe, they simply don't get in, also can't see what's inside the file,
I have now been collected dozens of unzip password, and a few hundred G the zip file, try really fail, seek help from a great god,
Run my own dictionary source in this, how to make zipfile. Zipfile identify my zip file, it is a zip, it is can prompt some, some not,
The import zipfile
Def extract () :
Try:
Zfile=zipfile. Zipfile (" ZIP file ", "r") # read the package, if necessary can add 'r'
F=open (' K: \ \ unzip password. TXT ', 'r', encoding="utf-8")
For the password in f.r eadlines () :
Try:
Password. Strip (' \ n ')
Zfile. Extractall (path=', PWD=password. Encode (' ASCII))
Print (" current compressed password as: ", password)
Break
Except the Exception:
Print (' wrong password + password)
Pass
Except the Exception as aaa:
Print (aaa)
F. lose ()
Zfile. Close ()
If __name__=="__main__" :
Extract ()