如何捕获传入/传出的连接 [英] How to catch an incomming/outgoing connection
本文介绍了如何捕获传入/传出的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要列出所有传入/传出的连接
授权/未经授权的连接都
帮帮我.
I want to list all incomming/outgoing connection
Authorised / UnAuthorized connection both
Help me.
推荐答案
使用 netstat 命令.它将列出所有连接.
这些链接可能会有所帮助.. netstat手册页和Windows上的netstat .
但是,请形成您的评论我想抓住这些连接.只是警告用户,如果用户要断开连接.则用户可以断开连接.",我认为代理或防火墙软件可以解决您的问题,请尝试
Use netstat command. It will list all connections.
These links may help.. netstat man page and netstat on windows.
But form your comment "I want to catch these kind a connection. Just alert user, if user want to diconnect. then user can disconnect.", I think a proxy or firewall software can solve your problem, try ashampoo firewall, it is free, and block whatever you want to block.
由于您使用编程语言标签发布了问题,因此我假设您要构建一个可以通知用户的程序.
为此,您可以使用例如(Win)PCap.它为您提供了一个程序api,使您可以捕获/监视网络流量.请参见 http://en.wikipedia.org/wiki/Pcap [
Since you posted your question with programming language tags, I assume you what to build a program that informs the user.
To do so you can use for example (Win)PCap. It offers a api for you''re program that allows you to capture / monitor the network traffic. See http://en.wikipedia.org/wiki/Pcap[^]
Regards
Piet
除了上述建议之外,您还需要购买
In addition to the advice above, you need to buy TCP/IP Illustrated, Volume 1: The Protocols.
Essentially you''re asking how to write a firewall and intrusion detection program. you have a wide range of protocols that you''ll need to understand, as it''s not as simple as just watching for connections. On a modern OS, there are lots of connections going in and out of your PC. Making sense of them is a huge task.
The netstat advice above, is a good start in getting a handle on what you''re PC is already doing.
这篇关于如何捕获传入/传出的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文