Skip to content

Instantly share code, notes, and snippets.

@0x-2a
Created June 22, 2023 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x-2a/6169c0b3f7925fb923775d2cfa7443fb to your computer and use it in GitHub Desktop.
Save 0x-2a/6169c0b3f7925fb923775d2cfa7443fb to your computer and use it in GitHub Desktop.
How to use p7zip for password-protected store only
# Install homebrew if you don't have it, see https://brew.sh/
#
# Then use brew to install p7zip
brew install p7zip
# Zip with no compression, just a password.
7z a -p'myPassword!!' -tzip -mem=AES256 -mm=Copy -mx=0 -mmt=8 ~/Desktop/myStuff.zip ~/Desktop/myFolder
# if you want to test, delete ~/Desktop/myFolder
# Unzip with a password.
7z x ~/Desktop/myStuff.zip -p'myPassword!!'
open myFolder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment