mirror of
https://github.com/5im-0n/sshenc.sh.git
synced 2025-08-02 19:30:05 +02:00
refactor test
This commit is contained in:
@@ -10,24 +10,15 @@ plaintext=$(cat sometext)
|
|||||||
|
|
||||||
echo -n 'testing multiple pubkeys: '
|
echo -n 'testing multiple pubkeys: '
|
||||||
../sshenc.sh -p id_rsa-1.pub -p id_rsa-2.pub -p id_rsa-3.pub < sometext > $tempfile
|
../sshenc.sh -p id_rsa-1.pub -p id_rsa-2.pub -p id_rsa-3.pub < sometext > $tempfile
|
||||||
cyph=$(../sshenc.sh -s id_rsa-1 < $tempfile)
|
|
||||||
if [ "$cyph" == "$plaintext" ]; then
|
for i in {1..3}; do
|
||||||
echo -n "key1: ✓ "
|
cyph=$(../sshenc.sh -s id_rsa-$i < $tempfile)
|
||||||
else
|
if [ "$cyph" == "$plaintext" ]; then
|
||||||
echo -n "key1: ⛝ "
|
echo -n "key$i: ✓ "
|
||||||
fi
|
else
|
||||||
cyph=$(../sshenc.sh -s id_rsa-2 < $tempfile)
|
echo -n "key$i: ⛝ "
|
||||||
if [ "$cyph" == "$plaintext" ]; then
|
fi
|
||||||
echo -n "key2: ✓ "
|
done
|
||||||
else
|
|
||||||
echo -n "key2: ⛝ "
|
|
||||||
fi
|
|
||||||
cyph=$(../sshenc.sh -s id_rsa-3 < $tempfile)
|
|
||||||
if [ "$cyph" == "$plaintext" ]; then
|
|
||||||
echo -n "key3: ✓ "
|
|
||||||
else
|
|
||||||
echo -n "key4: ⛝ "
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo done.
|
echo done.
|
||||||
|
Reference in New Issue
Block a user