How to send files?

To send files using Netcat, follow these steps:

On the Receiving End (Listener)

  1. Open a Terminal: Launch your terminal application.

  2. Set Up the Listener: Run the following command to listen for incoming file transfers:

    nc -l 12345 > received_file.txt
    • This command listens on port 12345 and redirects the incoming data to received_file.txt.

On the Sending End (Sender)

  1. Open Another Terminal: Launch a new terminal window.

  2. Send the File: Use the following command to send a file:

    nc localhost 12345 < file_to_send.txt
    • Replace file_to_send.txt with the path to the file you want to send.

Complete the Transfer

  • After executing the send command, the file will be transferred to the listener's terminal, and you will see it saved as received_file.txt.

If you have any further questions or need clarification, feel free to ask!

0 Comments

no data
Be the first to share your comment!