问题标签 [sharppcap]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
winpcap - PcapIpAddress 返回 0.0.0.0
我正在使用以下库:Tamir.IPLib.SharpPcap.dll 版本 1.0.2.0。
运行 Tamir.IPLib.Test.Example1,即(非常简短):
在 Windows XP 2002 版上,我可以毫无问题地获取设备的描述、名称和 IP 地址。但是如果使用 Windows 7 Professional 64 位 SP1,我只能正确获取 PcapDescription 和 PcapName。PcapIpAddress 会返回 0.0 .0.0.为什么?我该怎么做才能获得正确的 IPAddress?
谢谢
.net - ICMP数据包的源IP和目的IP
我正在使用 Sharp Pcap 捕获数据包,我可以轻松检查 IPpacket 或 ARP 数据包的 IP:
我想找到 ICMPPacket 的属性,但没有运气。如何检查 ICMPPacket 的源/目标地址?
c# - 无法将“PacketDotNet.EthernetPacket”类型的对象转换为“SharpPcap.RawCapture”类型
我一直在遵循http://www.codeproject.com/KB/IP/sharppcap.aspx上的指南来实现一个简单的数据包嗅探器。
将“PacketDotNet.EthernetPacket”转换为“SharpPcap.RawCapture”时出现错误。以下是执行转换部分的代码。
SharpPcap.RawCapture nextPacket = (SharpPcap.RawCapture)(lvMessages.Items[packetIndex].Tag);
这段代码我没有收到任何编译错误。我应该如何成功转换它?提前致谢。
c# - SharpPcap - 丢弃数据包或更改传出数据包
是否可以使用 SharpPcap 丢弃数据包或更改响应?我一直在网上寻找,而且我看到过旧的帖子,看起来好像不可能丢包。我不知道是否可以改变一个。
如果没有,有人可以向我指出一些有关如何执行此操作的资源的方向吗?
c# - Attempted to set a negative index while reading PCAP files
I have a randomly occurring problem on a set of PCAP files. I am trying to parse all the packets from the recorded PCAP files using SharpPcap and PacketDotNet. The errors seem to occur at random.
I am not doing anything fancy. The following is my code for loading from PCAP file:
In the ProcessPacket
method I get the
Attempted to set a negative index
when executing the following line:
I am using the latest version of both libraries, but I have tried implementations with older versions and ran into the same problem.
PCAP files were generated by Suricata IDS if that means anything.
Edit
I made a simple test using the following code:
What is interesting about this is that the number of files in which the errors occur varies from run to run. However, it seems to be increasing with each run.
Any help would be greatly appreciated.
wireshark - winpcap和sharpcap是否支持pcap-ng格式
我有一个 pcapng 格式的文件,想用 SharpPcap 打开它——这不起作用。
SharpPcap 使用 Winpcap (libpcap)。
所以我的问题是:WinPcap 和/或 SharpPcap 目前或将来是否支持 pcap-ng 格式?我找不到有关它的一些最新信息,只有一些旧帖子。
c# - 数据包操作(丢弃和更改)
我正在用 C# 编写一个简单的网络安全程序。为了捕获网络中的流量,我将使用 Sharppcap 库,它可以捕获所有数据包并在 UI 上显示它们的详细信息。但是,我在库中找不到任何可用于丢弃任何受其端口、源、目标或数据内容影响的数据包的方法。Sharppcap 支持这种功能吗?如果没有,我可以使用任何图书馆吗?
c# - 在程序的一个实例中读取多个 PcapFiles
我正在为 WinPcap 使用 Sharppcap 包装器,并且我试图在程序/程序生命周期的一个实例中连续读取多个 pcap 文件
它可以遍历第一个文件,但是一旦尝试解析第二个文件,它就会抛出 AccessViolationException。
我知道我可以为 1 个 pcap 文件创建一个该程序的实例,但我真的很想在一个程序中处理所有文件。有任何想法吗?
c# - C# SharpPcap 发送 Tcp 数据包
我试图通过 SharpPcap 将 Tcp 数据包发送到服务器,但它不起作用,有人可以帮助我或解释我如何使用 SharpPcap 和 Packet.Net 发送 TcpPackets。
更多信息:如果收到特定数据包,我正在嗅探连接并尝试向服务器发送消息。
谢谢阅读!
c# - Display the requested URL from any browser through C# using Fiddler
I want my C# console application to display only the requested URLs from any browser. Earlier I started with SharpPcap, but I was getting many IP addresses against one URL and could not filter and display only the requested URL. Then I switched to Fiddler and started by using simple fiddler code. The code is given below.
Now, my system does not use any proxy. After running this code, as soon as I enter an URL in any browser, it shows the URL but changes my proxy settings and no browser can open any website further saying "The proxy server is refusing connections". Toggling the 2nd and 3rd parameters of "FiddlerApplication.Startup" does not let Fiddler work properly to get the URLs. I want a global solution and does not want to change the system proxy settings anyway, yet want all the URLs, so that the code can be run on any machine irrespective of its original proxy settings and without hampering it.
Any kind of help is highly appreciated. Please help.