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
#!/usr/bin/python | |
###################################################################### | |
# Decrypt an Epsilon Note encoded file given the password. | |
# | |
# This file is in the public domain. | |
# | |
# original file by Dov Grobgeld <dov.grobgeld@gmail.com> 2017-02-17 | |
# | |
# adapted to python3 and aes256 by zettelding@gmail.com 2019-12-17 |
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
openssl enc -d -aes-256-cbc -iv $(sed -n '/~encrypted/,/~/!d;//d;p' <myfile.txt | base64 -d | tail -c16 | xxd -ps) -K $(echo -n mypassword|openssl dgst -r -sha256 | head -c64) < <(sed -n '/~encrypted/,/~/!d;//d;p' <myfile.txt | base64 -d | head -c-16) |