Okay i found one way with rot13
Say your script is called "script.sh". You can "encrypt" it with:
Quote:
|
shell$ cat script.sh | tr 'a-zA-Z' 'n-za-mN-ZA-M' >skrypt.sh
|
Then put this code at the very start of the encrypted script "skrypt.sh":
Quote:
#!/bin/sh
FIFO=/tmp/__skrypt_$(date +%F)_$$
mkfifo $FIFO
sh $FIFO &
tr 'a-zA-Z' 'n-za-mN-ZA-M' >$FIFO <<EOF_EOF
|
...and put these lines at the very end of the "encrypted" script:
Quote:
EOF_EOF
rm $FIFO >/dev/null 2>/dev/null
|
This isnt the safest but will deter most, plus you can make it stronger by double encrypting etc...
I am trying to work out another way with md5 which would be better i think!