添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

// Tutorial //

How To Use Netcat to Establish and Test TCP and UDP Connections

Published on February 19, 2014 · Updated on July 9, 2021
How To Use Netcat to Establish and Test TCP and UDP Connections

Introduction

General Syntax

      1. How To Use Netcat for Port Scanning

          1. I/O redirection article for more info). We can send the standard error messages to standard out, which will allow us to filter the results easier.

            1. How To Communicate through Netcat

                1. How To Send Files through Netcat

                            1. How To Use Netcat as a Simple Web Server

                                  1. Conclusion


Still looking for an answer?

Ask a question Search for more help

Was this helpful?
10 Comments


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Amazing. I’d heard of netcat and wanted to get started with it but did not know where to begin. This is a perfect intro, thanks!

This comment has been deleted

<strong>Nice</strong>

incredible article!

Good article!!!

Nice article. One point worth mentioning.

When using netcat as a simple web server, you have this command written: netcat -l 8888 < index.html

You actually need to specify the port in the command, or else it won’t work. Try this instead. netcat -lp 8888 < index.html I found this solution to work.

Keep up the good work!

nice article you covered lot of variants, can you please also show an example to listen( nc -lu <port_num>) on specific udp port. That could be helpful for the first readers.

great intro to netcat , thanks! I use nmap for doing port scanning, but its nice to be able to do it with netcat as well, since nmap is often not included in the base linux packages.