From d001f36c6ba63e87add85fcc97b89d6292a7b2de Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 15 Aug 2023 16:21:30 +0930 Subject: [PATCH] feat(flows_cred): bash encryption script !3 #4 --- encrypt-flows-cred.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 encrypt-flows-cred.sh diff --git a/encrypt-flows-cred.sh b/encrypt-flows-cred.sh new file mode 100755 index 0000000..cedc189 --- /dev/null +++ b/encrypt-flows-cred.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Description: +# Encrypt flows_cred.json.tmp from the specified directory to flows_cred.json. You will be prompted for the encryption password. +# +# Usage: +# ./encrypt-flows-cred.sh {path to cred file, if PWD use '.'} +# +# Changelog: +# 2023-08-15: Script creation. +# + +echo -n "Please enter the flows_cred.json decryption key: "; +read -s PASSWORD; +echo; + +Rand=$(tr -dc 'A-Fa-f0-9' $1/flows_cred.json +{ + "$": "$Rand$EncryptedData" +} +EOF + +echo; + +rm $1/flows_cred.json.tmp;