Fun with OpenSSL encryption
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this somehwere in .bashrc/aliases/etc. | |
# OpenSSL must be installed -- these are just aliases. | |
alias enc='openssl enc -e -aes-256-cbc -salt ' | |
alias dec='openssl enc -d -aes-256-cbc ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encrypted gzipped db dump | |
mysqldump -uroot DBNAME|enc|gzip -c>db.sql.enc.gz | |
# decrypted gzipped db dump | |
gunzip -dc db.sql.enc.gz|dec>db.sql | |
# decrypted gzipped db dump to import -- sneaky sneaky o_O | |
gunzip -dc db.sql.enc.gz|dec|mysql -uroot DBNAME | |
# encrypted tarball | |
tar czf - blah/|enc > blah.tar.gz.enc | |
# decrypt encrypted tarball | |
dec < blah.tar.gz.enc|tar xzf - | |
# fun with passwords! | |
enc < passwords.txt > passwords.txt.enc | |
dec < passwords.txt.enc > passwords.txt | |
# ... and so on and so forth ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment