Message109342
On a WinZip AES-256 encrypted zip, zipfile.extractall raises a RuntimeError for "Bad password for file" when given the correct password. Command line example below:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from zipfile import ZipFile
>>> zip = ZipFile("example.zip", "r")
>>> zip.extractall(".", pwd="cat")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/zipfile.py", line 935, in extractall
self.extract(zipinfo, path, pwd)
File "/usr/lib/python2.6/zipfile.py", line 923, in extract
return self._extract_member(member, path, pwd)
File "/usr/lib/python2.6/zipfile.py", line 963, in _extract_member
source = self.open(member, pwd=pwd)
File "/usr/lib/python2.6/zipfile.py", line 898, in open
raise RuntimeError("Bad password for file", name)
RuntimeError: ('Bad password for file', <zipfile.ZipInfo object at 0xb739e26c>)
>>> |
|
Date |
User |
Action |
Args |
2010-07-05 17:42:23 | aymill | set | recipients:
+ aymill |
2010-07-05 17:42:23 | aymill | set | messageid: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> |
2010-07-05 17:42:22 | aymill | link | issue9170 messages |
2010-07-05 17:42:21 | aymill | create | |
|