-
-
Save valitnon/809f6e1328b8ec4f1d16a74251d54b18 to your computer and use it in GitHub Desktop.
Revisions
-
leonklingele revised this gist
Jul 8, 2016 . 2 changed files with 6 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,15 @@ IP="127.0.0.1" PORT="8877" SHARED_SECRET="shared secret" OPENSSL="/usr/local/opt/libressl/bin/openssl" OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" while IFS= read -r MSG; do echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" echo done | \ nc "$IP" "$PORT" | \ while IFS= read -r REC; do echo "Server: $(echo "$REC" | $OPENSSL_CMD -d -k "$SHARED_SECRET")" done This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,15 @@ #IP="127.0.0.1" PORT="8877" SHARED_SECRET="shared secret" OPENSSL="/usr/local/opt/libressl/bin/openssl" OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" while IFS= read -r MSG; do echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" echo done | \ nc -l "$PORT" | \ while IFS= read -r REC; do echo "Client: $(echo "$REC" | $OPENSSL_CMD -d -k "$SHARED_SECRET")" done -
leonklingele created this gist
Mar 5, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ IP="127.0.0.1" PORT="8877" SERVER_PASSWORD="server password" CLIENT_PASSWORD="client password" OPENSSL="/usr/local/opt/libressl/bin/openssl" OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" while IFS= read -r MSG; do echo "$MSG" | $OPENSSL_CMD -e -k "$CLIENT_PASSWORD" echo done | \ nc "$IP" "$PORT" | \ while IFS= read -r REC; do echo "Server: $(echo "$REC" | $OPENSSL_CMD -d -k "$SERVER_PASSWORD")" done This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #IP="127.0.0.1" PORT="8877" SERVER_PASSWORD="server password" CLIENT_PASSWORD="client password" OPENSSL="/usr/local/opt/libressl/bin/openssl" OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" while IFS= read -r MSG; do echo "$MSG" | $OPENSSL_CMD -e -k "$SERVER_PASSWORD" echo done | \ nc -l "$PORT" | \ while IFS= read -r REC; do echo "Client: $(echo "$REC" | $OPENSSL_CMD -d -k "$CLIENT_PASSWORD")" done