diff --git a/decrypt-flows-cred.sh b/decrypt-flows-cred.sh old mode 100644 new mode 100755 index cc27f29..9129da0 --- a/decrypt-flows-cred.sh +++ b/decrypt-flows-cred.sh @@ -10,12 +10,16 @@ # 2023-08-14: Fetched script from original source # Credit to the original author/creator. # 2023-08-14: Adjusted to prompt for password when running command. +# 2023-08-14: Adjusted to output to a file called 'flows_cred.json.tmp' # echo -n "Please enter the flows_cred.json decryption key: "; read -s PASSWORD -echo. +echo; -jq '.["$"]' -j $1/flows_cred.json | \ +DecryptedData=$(jq '.["$"]' -j $1/flows_cred.json | \ cut -c 33- | \ - openssl enc -aes-256-ctr -d -base64 -A -iv `jq -r '.["$"]' $1/flows_cred.json | cut -c 1-32` -K `echo -n $PASSWORD | sha256sum | cut -c 1-64` + openssl enc -aes-256-ctr -d -base64 -A -iv `jq -r '.["$"]' $1/flows_cred.json | cut -c 1-32` -K `echo -n $PASSWORD | sha256sum | cut -c 1-64`) + +echo -n $DecryptedData > $1/flows_cred.json.tmp +#echo -n $DecryptedData