简体   繁体   English

如何使用 Java 捕获网络流量并在不使用代理的情况下获取文件类型?

[英]How to capture Network traffic using Java and get file type without using Proxy?

I need to capture network traffic using Java and get the File type.我需要使用 Java 捕获网络流量并获取文件类型。 eg: IF it is xmlHTTPrequest the File type is XHR.例如:如果是 xmlHTTPrequest,则文件类型是 XHR。

Depends on what you actually want to do.取决于你真正想要做什么。 But if you want a whole machine network sniffer (something like what whireshark is doing), libpcap or winpcap is probably what you're searching for.但是如果你想要一个完整的机器网络嗅探器(类似于whireshark正在做的事情),libpcap或winpcap可能就是你正在寻找的。 There is also a java library which handles the low level stuff: pcap4j还有一个处理低级内容的java库:pcap4j

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM