On Thu, 04 Mar 2004, 01:20 GMT-08 (10:20 local time) Professional
Software Engineering wrote:
unzip -Pboguspw -t zipfilename.zip
Check for a nonzero return code. More specifically, 82, though if SOME
files are encrypted and some are not, then the error would be 1, so nonzero
should suffice to mean a file which is going to have issues being
decompressed and scanned.
why so complicated? A one-line condition can first tell you if the ZIP
is encrypted or not:
zipinfo file.zip | sed -ne '2p' | sed -ne 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]*
*\(.\).*/\1/p'
If this returns 'T' or 'B', the ZIP is encrypted, otherwise it isn't.
rob.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail