Netcat is a utility in unix to investigate network connections. It has now been ported to windows and it allows us to query network connections on a windows platform with netcat (nc). A nice possibility is to push files via nc from one machine to another. Assume for the moment that both machines have netcat installed. If not, it can be retrieved here.
On the receiving machine a listener process is started with:
nc -l -p 1234 > romme.txt
This process listens to local port 1234 and it will store all information in file „romme.txt“.
On the sending machine, we reach out to the receiving machine. Doing so, we start a datastream that streams the contents of the file that we want to send across. This can be done via:
type invoer.txt | nc 192.168.2.22 1234
The file is sent to a stream (via type). The stream is captured via the pipe symbol. It is transmitted to the nc command. The nc reaches out to machine 192.168.2.22, where the listener process is invokes. Everything is handled via the 1234 port. On the receiving machine, signals are received on the 1234 port. The data are captured and they are stored in file romme.txt.