Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Server sending file
server$ socat -u FILE:test.dat TCP-LISTEN:9876,reuseaddr
client$ socat -u TCP: OPEN:out.dat,creat
# Server receiving file
server$ socat -u TCP-LISTEN:9876,reuseaddr OPEN:out.txt,creat && cat out.txt
client$ socat -u FILE:test.txt TCP:
# Server sending file with encryption
server$ ccrypt -e -K password file.txt | socat -u STDIN TCP-LISTEN:4444,reuseaddr
client$ socat -u TCP: STDOUT | ccrypt -d -K password > out.txt
# Server receiving file with enryption
server$ socat -u TCP-LISTEN:4444,reuseaddr STDOUT | ccrypt -d -K password > out.txt
client$ ccrypt -e -K password file.txt | socat -u STDIN TCP:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.