[issue6749] Support for encrypted zipfiles when interpreting zipfile as script

Gregory P. Smith report at bugs.python.org
Mon Aug 24 03:05:32 CEST 2009


Gregory P. Smith <greg at krypto.org> added the comment:

The decryption provided by the zipfile module is for the worthless
32-bit crc based "encryption" of zipfiles.  I think promoting the use of
that is a bad idea.

zipfile can be used by people to get their data out of such files.  We
should not encourage them to put it and/or their code into such a stupid
format.

-1 on supporting this.

Anyways as to implementation details, yes you'd need a way to accept a
key on the command line (or prompt for it using getpass?) and pass it to
the import mechanism at import time.  For zip files with only the
contained file data "encrypted" (the only thing the zipfile module
supports) a zip file could be checked for __init__.py and .py files
without decrypting first so that a password is only prompted for when
such a module is imported.

Again I don't see value in that.

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6749>
_______________________________________


More information about the Python-bugs-list mailing list