Skip to content

Instantly share code, notes, and snippets.

@nirdosh17
Last active September 26, 2019 04:31
Show Gist options
  • Save nirdosh17/032fff0dc5c567d286934dd6b9f36eb7 to your computer and use it in GitHub Desktop.
Save nirdosh17/032fff0dc5c567d286934dd6b9f36eb7 to your computer and use it in GitHub Desktop.
Netcat send data to a machine in network
1. Receiver
1.1 Print out receiver IP. We need this IP in step 2.
❯❯❯ ipconfig getifaddr en0
1.2 Run this command in the receiving computer listen to the port 4444 and print out msg:
❯❯❯ nc -vl 4444
If you want to save msg to a file:
❯❯❯ nc -vl 4444 > received_msg.txt
2. Sender
You need receiver IP[from step 1.1] in order to send data
❯❯❯ nc -w 192.168.1.127 4444 < ~/.aws/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment