已经有一个通过套接字工作的服务器服务,我想通过 netcat 测试它。我使用的是 Mac OS X Lion。目前,我可以通过端口连接到服务器,发送数据包,但数据包包含错误的值。详细信息如下:
我需要向服务器发送“m”符号,服务器将返回 00000000,即零字节作为响应。服务器人员告诉我,当我发送“m”时,服务器收到“A0”,当我发送“109”时,服务器收到“313039A”。如何定义发送格式什么的,我只需要发送“m”(01101101)?
There's already a working server service via socket, and I would like to test it via netcat. I'm using Mac OS X Lion. Currently, I'm able to connect to server via port, to send packet, but the packet contains wrong value. Here are the details:
I need to send 'm' symbol to the server and the server will return 00000000, a zero byte as a response. Server guy told me, server receives 'A0' when I'm sending 'm', and server receives '313039A' when I'm sending '109'. How to define sending format or something, I just need to send 'm' (01101101)?
发布评论
评论(1)
您可以只发送“m”,
您可以轻松地检查您在本地计算机上发送的内容:
nc 将很乐意发送/接收 NUL 字节 - 没有问题:
You can send just "m" with
You can easily check what you're sending on your local machine:
nc will happily send/receive NUL bytes - there is no problem with that: