Bash script to xor a file with one char key.
#!/bin/bash
if·[·"$1"·=·""·]·||·[·"$2"·=·""·];·then
echo·"Usage:·$0·<file>·<key>"
exit
fi
key=$(printf·'%d'·"'$2")
while·read·-r·-s·-N·1·c;·do
c=$(printf·'%d'·"'$c")
if·[·"$c"·!=·"$key"·];·then
» c=$((c·^·key))
fi
printf·"\\$(printf·'%o'·"$c")"
done·<·$1
USE IT AT YOUR OWN RISK!