I'm just doing my first steps with python 3 and tried to unzip a file which is protected by the password 'acb'. I'm able to unzip a files which isn't password protected but a nother zip files which has a password can't be unzipt.
I hope you can help me.
Code:
import zipfile
zipFile = zipfile.ZipFile(r'C:\Users\Desktop\pyth\test.zip')
psw = 'acb'
zipFile.extractall(pwd=str.encode(psw))
Thanks for your help!
Edit: I also tried this but it didn't work for me as well
from zipfile import ZipFile
with ZipFile('test.zip') as zf:
zf.extractall(pwd='acb')