# I'm a shell script :-) so please make me executable! # No shebang but I work equally well with Bash, Dash and Zsh # The script embeds link-grammar, a x86-64 ELF so it requires to be run on a x86-64 linux system if [ "$*" = "" ] || ([ "$1" != "-e" ] && [ "$1" != "-d" ]) || [ "$2" = "" ]; then cat << EOF Usage: Encryption: echo "I want to encrypt this sentence" | $0 -e 12345 I need to besiege this carat Decryption: echo "I need to besiege this carat" | $0 -d 12345 I want to encrypt this sentence exit 1 KEY=$2 MODE=$1 TMPWC=/tmp/weirdcrypto [ -d $TMPWC ] || unzip -qq -d /tmp $0 weirdcrypto/\* || exit 1 if [ "$MODE" = "-e" ]; then cat | $TMPWC/encode | $TMPWC/decode $KEY else cat | $TMPWC/encode $KEY | $TMPWC/decode exit 0