Created
May 21, 2016 09:05
-
-
Save kizzx2/eef1eaae3e8b48b9f3fdac9d59253541 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# Server sending file | |
server$ socat -u FILE:test.dat TCP-LISTEN:9876,reuseaddr | |
client$ socat -u TCP:127.0.0.1:9876 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:127.0.0.1:9876 | |
# Server sending file with encryption | |
server$ ccrypt -e -K password file.txt | socat -u STDIN TCP-LISTEN:4444,reuseaddr | |
client$ socat -u TCP:127.0.0.1:4444 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:127.0.0.1:4444 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment