常用命令
扫描端口
bash
# 扫描 TCP 端口
nc -z -v 45.63.36.170 29900-29905
# 扫描 UDP 端口
nc -u -z -v 45.63.36.170 29900-29905
监听端口
bash
# 监听 TCP 端口
nc -l 4444
# 监听 UDP 端口
nc -u -l 4444
# 监听多个 UDP 端口,并且不过期
nc -kluvw 0 4444
# 连接 TCP 端口
nc 127.0.0.1 4444
# 连接 UDP 端口
nc -u 127.0.0.1 4444
Reference
How To Use Netcat to Establish and Test TCP and UDP Connections | DigitalOcean
Linux is known for having a great number of mature, useful command line utilities available out of the box in most distributions. https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections
Discussion
留言与讨论
想法、补充和不同意见都欢迎。