1
0
mirror of https://github.com/5im-0n/sshenc.sh.git synced 2025-08-02 11:20:05 +02:00

fix shell redirection bug

This commit is contained in:
gustavo panizzo
2020-02-27 01:47:43 +01:00
parent f28a78ff82
commit b79df269c8

View File

@@ -120,7 +120,7 @@ elif [[ -e "$private_key" ]]; then
decrypted=false decrypted=false
for key in "${keys[@]}"; do for key in "${keys[@]}"; do
if ((echo "$key" | openssl base64 -d -A | openssl rsautl -decrypt -oaep -inkey "$temp_dir/private_key" >"$temp_file") >/dev/null 2>&1); then if $(echo "$key" | openssl base64 -d -A | openssl rsautl -decrypt -oaep -inkey "$temp_dir/private_key" >"$temp_file" 2>/dev/null); then
if echo "$cypher" | openssl base64 -d -A | openssl aes-256-cbc -pbkdf2 -iter 100000 -d -pass file:"$temp_file"; then if echo "$cypher" | openssl base64 -d -A | openssl aes-256-cbc -pbkdf2 -iter 100000 -d -pass file:"$temp_file"; then
decrypted=true decrypted=true
fi fi