If I want to transfer a binary file "binary.bin" (located in the same directory as NetCat) to IP address 127.0.0.1 port 1200 using TCP, how do I specify this using NetCat for windows?
Netcat, also known as a “TCP/IP swiss army knife,” is a command-line network tool that allows you to transfer files through local networks or the Internet. It provides an easier way to transfer data without the need for additional services.
The Netcat ( nc ) command is a command-line utility for reading and writing data between two computer networks. The communication happens using either TCP or UDP.
A basic file transfer is very simple: Start Ncat in listen mode on one end, start Ncat in connect mode on the other end, and pipe the file over the connection. There are two ways to do this that differ only in which end listens, the sender or the receiver.
I found the solution. Its
nc 127.0.0.1 1200 < binary.bin
In addition, if the response needs to be saved then
nc 127.0.0.1 1200 < binary.bin > response.bin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With