Difference between revisions of "NetCat"

From John Freier
Jump to: navigation, search
Line 20: Line 20:
  
 
and then start typing
 
and then start typing
 +
 +
 +
== Send a file ==
 +
This will send a file to another computer on the same network
 +
 +
hosted file computer - 10.0.0.1
 +
  cat file.doc | nc 10.0.0.2 8001
 +
 +
remote file to receive the file
 +
  nc -l 8001 > file.doc

Revision as of 17:45, 15 February 2019

Redirect ports.

This one redirect port 24 to port 22.

24 stream tcp nowait nobody /usr/sbin/tcpd /bin/nc 192.168.1.1 22


This one redirects port 6000(x11) to port 25

x11 stream tcp nowait root /usr/local/bin/nc nc -n -w 3 127.0.0.1 25


Start a chat

host computer - 10.0.0.1

 nc -l 8001

remote computer - 10.0.0.2

 nc 10.0.0.1 8001

and then start typing


Send a file

This will send a file to another computer on the same network

hosted file computer - 10.0.0.1

 cat file.doc | nc 10.0.0.2 8001

remote file to receive the file

 nc -l 8001 > file.doc