Last active
April 22, 2019 01:30
-
-
Save yellowcrescent/afb08d74746210cc0370921aafec2629 to your computer and use it in GitHub Desktop.
decrypt and open aesgcm URLs
This file contains hidden or 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
#!/bin/bash | |
INAES="$1" | |
URL=$(echo $1 | sed 's/aesgcm:/https:/') | |
KEY=$(echo $1 | awk -F\# '{print $2}') | |
EXT=$(echo $1 | awk -F\# '{print $1}' | awk -F. '{print $NF}') | |
TMPFILE=$(tempfile).${EXT} | |
echo "Decrypting to $TMPFILE ..." | |
curl -s "${URL}" | ./aesgcm ${KEY} > ${TMPFILE} | |
xdg-open ${TMPFILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment