Skip to content

Instantly share code, notes, and snippets.

@eruffaldi
Last active Dec 20, 2017
Embed
What would you like to do?
Simple Network Transfer

Direct

Receiver: nc -q2 -l 12345 > myfile.tar

Sender tar cf - FILES --verbose --checkpoint=64000 | nc IPDEST 12345

This can be reversed in direction

Encyprion

SHARED_SECRET="shared secret"

OPENSSL="openssl" OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-cbc"

INPUT | $OPENSSL_CMD -e -k "$SHARED_SECRET" | nc IPDEST 12345 nc -q2 -l 12345 | $OPENSSL_CMD -d -k "$SHARED_SECRET"

http://www.dest-unreach.org/socat/doc/socat-openssltunnel.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment