This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce465pine64backup/hw3/task4/find_key.sh
2018-03-05 23:05:46 -06:00

10 lines
295 B
Bash
Executable file

#!/bin/bash
filename="itworkmaybe.txt"
while read line; do
openssl enc -aes-128-cbc -d -in ciphertext.txt -out itworkmaybe.txt -iv 0000000000000000 -K $line
read aline < "$filename"
if [ "$aline" == "This is a top secret." ]; then
echo $line
break
fi
done < "$1"