与命令“nc [server_name] [port]”等效的 Windows 是什么?

Emo*_*lga 6 netcat internet-connection

在 linux 上,可以通过键入连接到服务器 nc pwnable.kr 9000 在终端上。

在 Windows 上,这在 Powershell 或 cmd 中都不起作用,而且在使用 Telnet 时,Putty 最初看起来像是已连接,然后每当我输入某些内容时它就会退出,这不是 Linux 上的行为。那么在 Windows 上访问此服务器并向其发送命令的正确方法是什么?

小智 9

您可以从此站点下载 ncat 的便携式版本:https://nmap.org/ncat/ 这是测试版 ( http://nmap.org/dist/ncat-portable-5.59BETA1.zip )。如果您愿意,也可以使用此站点上提供的适用于 Windows 的 nmap 命令。


小智 8

Windows 中的等效项是Test-NetConnection - 它将测试与目标的连接是否有效并显示某些调试输出。

Test-NetConnection -ComputerName superuser.com -Port 443

ComputerName     : superuser.com
RemoteAddress    : 151.101.193.69
RemotePort       : 443
InterfaceAlias   : LAN-Connection* 12
SourceAddress    : 10.254.93.150
TcpTestSucceeded : True 
Run Code Online (Sandbox Code Playgroud)

  • 不会。“Test-NetConnection”将尝试打开套接字并报告是否成功。 `nc` 或 `netcat` 将为用户提供与该套接字的开放连接,以便他们可以输入将发送到服务器的数据。 (10认同)