Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
1 #!/bin/sh
2 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
3 do
4 file="test$i.txt"
5 grep "KEY = " $file | sed -e 's;KEY = ;;' | hex > key$i
6 grep "IV = " $file | sed -e 's;IV = ;;' | hex > iv$i
7 grep "PLAINTEXT = " $file | sed -e 's;PLAINTEXT = ;;' | hex > plaintext$i
8 grep "CIPHERTEXT = " $file | sed -e 's;CIPHERTEXT = ;;' | hex > ciphertext$i.bin
9 btoa < ciphertext$i.bin > ciphertext$i
10 rm ciphertext$i.bin
11 done