windows 测试套接字连接的好工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/515328/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Good tool for testing socket connections?
提问by Name
I'm writing a tcp/ip client and I would need a "test server" to be able to test easily. It should listen on a configurable port, show me when a client connects and what the client sent, allow me to manually enter text to send to the client. It should work on Windows.
我正在编写一个 tcp/ip 客户端,我需要一个“测试服务器”才能轻松测试。它应该侦听可配置的端口,显示客户端何时连接以及客户端发送的内容,允许我手动输入要发送给客户端的文本。它应该适用于 Windows。
Normally I would have use the simple but powerfull nc.exe (alias "Netcat" available as well on Unix as on Windows)but the antivirus detects it as an "hacker tool" so that my system administrator doesn't want me to use it at work.
通常我会使用简单但功能强大的nc.exe(在 Unix 和 Windows 上都可以使用别名“Netcat”),但防病毒软件将其检测为“黑客工具”,因此我的系统管理员不希望我使用它在上班。
Does anyone use another tool to test socket connections and is happy with it?
有没有人使用其他工具来测试套接字连接并对此感到满意?
回答by patros
回答by j_random_hacker
netcat
(nc.exe
) is the right tool. I have a feeling that any tool that does what you want it to do will have exactly the same problem with your antivirus software. Just flag this program as "OK" in your antivirus software (how you do this will depend on what type of antivirus software you use).
netcat
( nc.exe
) 是正确的工具。我有一种感觉,任何可以执行您希望它执行的操作的工具都会与您的防病毒软件完全相同。只需在您的防病毒软件中将此程序标记为“OK”(您如何执行此操作取决于您使用的防病毒软件的类型)。
Of course you will also need to configureyour sysadmin to accept that you're not trying to do anything illegal...
当然,您还需要配置您的系统管理员以接受您没有尝试做任何非法的事情......
回答by j_random_hacker
回答by Geo
I would go with netcat too , but since you can't use it , here is an alternative : netcat:). You can find netcat implemented in three languages ( python/ruby/perl ) . All you need to do is install the interpreters for the language you choose . Surely , that won't be viewed as a hacking tool .
我也会和 netcat 一起去,但因为你不能使用它,这里有一个替代方案:netcat:)。您可以找到用三种语言 (python/ruby/perl) 实现的 netcat。您需要做的就是为您选择的语言安装解释器。当然,这不会被视为黑客工具。
Here are the links :
以下是链接:
回答by Name
I also found a tool called TCP/IP Test Server[Edit: no longer available from the original developer, but still available via Brothersoft] which seems to do what I need too. But I didn't try it because it is not listed on big freeware-sites (like CNET...) and no source code is published so that it won't reassure a paranoid sysadmin.
我还发现了一个名为TCP/IP 测试服务器的工具[编辑:不再从原始开发人员处获得,但仍可通过Brothersoft 获得],它似乎也满足了我的需求。但我没有尝试它,因为它没有在大型免费软件站点(如 CNET...)上列出,并且没有发布源代码,因此它不会让偏执的系统管理员放心。
回答by Name
Another tool is tcpmon. This is a java open-source tool to monitor a TCP connection. It's not directly a test server. It is placed in-between a client and a server but allow to see what is going through the "tube" and also to change what is going through.
另一个工具是tcpmon。这是一个用于监控 TCP 连接的 Java 开源工具。它不是直接的测试服务器。它位于客户端和服务器之间,但允许查看通过“管道”的内容并更改正在通过的内容。
回答by David Anderson
In situations like this, why not write your own? A simple server app to test connections can be done in a matter of minutes if you know what you're doing, and you can make it respond exactly how you need to, and for specific scenarios.
在这种情况下,为什么不自己编写呢?如果您知道自己在做什么,则可以在几分钟内完成一个简单的服务器应用程序来测试连接,并且您可以使其准确响应您需要的方式以及针对特定场景。