Skip to content

Instantly share code, notes, and snippets.

@homam
Created April 13, 2016 07:00
Show Gist options
  • Save homam/5dd7ecd8400bf3863b877594ee7f45f7 to your computer and use it in GitHub Desktop.
Save homam/5dd7ecd8400bf3863b877594ee7f45f7 to your computer and use it in GitHub Desktop.
encrypt messages from server to client with nc
# server
while true; do read ui; echo $ui | openssl enc -aes128 -a -k PaSSw; done | nc -vl 192.168.1.2 1300
# client
nc 192.168.1.2 1300 | while read so; do decoded=`echo "$so" | openssl enc -d -a -aes128 -k PaSSw`; echo "$decoded"; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment