Last active
September 26, 2019 04:31
-
-
Save nirdosh17/032fff0dc5c567d286934dd6b9f36eb7 to your computer and use it in GitHub Desktop.
Netcat send data to a machine in network
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 characters
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