python 拦截通信
假设您在计算机上运行第三方程序,该程序创建一个名为 example.exe 的进程,
我如何确定该进程是否正在运行以及他打开了多少个窗口?我如何拦截该窗口和服务器之间的网络通信?
我的目标是创建一个应用程序,它将监视 example.exe 及其主服务器之间的网络流量,以便分析数据并保存到数据库,最后模拟用户交互以获取更多相关数据
lets say you run third party program on your computer whitch create a process named example.exe
how do i determinate if this process is running and how many windows does he open? How do i intercept network communication between this windows and server?
my goal is to create an app whitch will be monitoring network trafic between example.exe and its home server in order to analyze data and save to database, and finally simulate user interaction to get more relevant data
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于网络嗅探,请使用 pypcap 捕获网络流量。 pypcap 是 libpcap(Windows 上的 WinPcap)的 Python 接口,用于流行的网络嗅探器 Wireshark(曾经称为 Ethereal)。
关于进程信息,例如它是否正在运行以及查找所有打开的窗口,我确信您可以使用 Windows API 来完成此操作。这意味着您可以使用 win32 库 在 Python 中完成此操作,该库可让您使用大多数 Windows直接API。所以这现在变成了一个 Windows API 问题,我无能为力。
请每个问题只问一个问题。
For network sniffing, use pypcap to capture network traffic. pypcap is a Python interface to libpcap (WinPcap on Windows), which is used the popular network sniffer Wireshark (once known as Ethereal).
Regarding process information, such as whether it is running and finding all of its open windows, I'm pretty sure you can do this with the Windows API. This means that you can do it in Python using the win32 library which lets you use most of the Windows API directly. So this now becomes a Windows API question, with which I can't help.
Please ask just one question per, umm, question.
您可以使用wireshark.org 中的wireshark 来嗅探网络流量(或任何其他数据包嗅探器)。
You could use wireshark from wireshark.org to sniff the network traffic (or any other packet sniffer).