Wednesday, July 6, 2011

Linux Password Protect Zips


Those of us who work around malware often need to password protect malware specimen within a zip archive in order to avoid accidental infection and/or antivirus quarantine. I can never remember the syntax for doing this from the Linux command line and it always seems hard to find via google, so I thought I would document it here.

To Zip: zip -P <password> -r <output.zip> <input file(s)>

To Unzip: unzip <output.zip>