Created
August 2, 2011 00:11
-
-
Save kyleterry/1119290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PORT=6660 | |
function enc { | |
password=$1 | |
while [ True ] ; do | |
read enc_text | |
echo "$enc_text" | openssl enc -rc4 -k $password | openssl enc -a | |
done; | |
} | |
function dec { | |
password=$1 | |
while [ True ] ; do | |
read dec_text | |
echo "$dec_text" | openssl enc -d -a | openssl enc -d -rc4 -k $password | |
done; | |
} | |
function ncsecure-server { | |
password=$1 | |
enc $password | nc -l $PORT | dec $password | |
} | |
function ncsecure-client { | |
host=$1 | |
password=$2 | |
enc $password | nc $host $PORT | dec $password | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment