Skip to content

Instantly share code, notes, and snippets.

@kyleterry
Created August 2, 2011 00:11
Show Gist options
  • Save kyleterry/1119290 to your computer and use it in GitHub Desktop.
Save kyleterry/1119290 to your computer and use it in GitHub Desktop.
#!/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