读取通过/ dev / tcp /发送的tcp数据包的输出?


0

我使用以下命令将host的“ ls”输出发送到host2:

ls >/dev/tcp/<host2_IP>/<host2_port>

但我想找到一种方法,可以直接在主机2上看到此“ ls”命令的输出。

知道如何进行吗?

Answers:


2

您可以使用netcat监听您指定的端口

nc -l 3333

(我以端口3333为例)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.