Skip to content

Instantly share code, notes, and snippets.

@Kurt-P
Created August 16, 2013 17:34
Show Gist options
  • Save Kurt-P/6251859 to your computer and use it in GitHub Desktop.
Save Kurt-P/6251859 to your computer and use it in GitHub Desktop.
How to use netcat
#to send with netcat
nc -p 9000 -l < '/path/to/file
#e.g. nc -p 9000 -l /home/user/text.txt
#to receve with netcat
nc 0.0.0.0 (ip of sender) 'port number' > '/path/to/save/file
#e.g. nc 128.101.71.9 9000 > /home/kurt/text.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment