Questions tagged [sharppcap]

This tag wiki does not currently have an excerpt. Help by creating one

SharpPcap project home.

125 questions
2
votes
1 answer

Unable to activate the adapter by using Npcap instead of Winpcap

I am trying to use Sharppcap in order to pack and send UDP packages. I am able to send packages by Windows Loopback Adapter but it limits the byte length to 1500. However, I need to send larger packages in order to be faster. I installed Npcap to…
Learner
  • 21
  • 3
2
votes
2 answers

C# SharpPcap issues

I've been very interested in using SharpPcap, but so far it's not been going well. The main problem is the following code: private static void device_OnPacketArrival(object sender, CaptureEventArgs packet) { if(packet is TCPPacket) …
Nick
  • 1,082
  • 1
  • 15
  • 27
2
votes
1 answer

c# network monitor app made by using sharpPcap, Method which should display one msgbox per call showes multiple msgboxes per one call

Im building application which should show network traffic per process.Im using SharpPcap. Idea is to start capturing network traffic on new threads,one thread per process.How it should work:Start capture on new thread,wait for 2000 ms,stop…
John Doe
  • 89
  • 1
  • 11
2
votes
1 answer

Can SharpPcap be used to find ip cameras in my network in C#

My objective is to list all the ip cameras in a given network by C# code. I am able to list all the ip addresses on my network using the GetIpNetTable(C# code) here. Can sharppcap be of any help in this regard? Note I am absolutely new to…
VivekDev
  • 20,868
  • 27
  • 132
  • 202
2
votes
0 answers

SharpPcap Exception during Capture

I've been trying to build a packet sniffer using SharpPcap and PacketDotNet. This is my code so far: public static void SniffConnection() { var packets = new List(); var devices = CaptureDeviceList.Instance; PcapDevice device…
user3554255
  • 41
  • 2
  • 8
2
votes
1 answer

IP address spoofing using SharpPcap on C#

I will use SharpPcap framework to make my spoofing program, so I need to edit my machine's IP address of the packet with another IP address on the source address field. I found some example on SharpPcap project, but how can I edit or change the…
SomeOne
  • 71
  • 2
  • 4
2
votes
1 answer

Sending an LLDP packet using SharpPcap and Packet.Net

So, I spent the afternoon trying to send an LLDP packet in c# using SharpPcap and Packet.Net. What I came up with bombs with an NullReferenceException. I know why, but I don't know what to do about it. This is my code: namespace LLDPTest { using…
lightxx
  • 1,037
  • 2
  • 11
  • 29
2
votes
2 answers

SharpPcap - A Packet Capture problem to extract information from the packet

I'm using SharpPcap to capture packets. I'm trying to get Traffic Class value and I'm using udp.ipv6.TrafficClass.ToString(). the problem that I'm getting this exception: Object reference not set to an instance of an object. private void…
Eyla
  • 5,751
  • 20
  • 71
  • 116
2
votes
3 answers

SharpPcap 4.2 with WinPcap 4.1.3 gives "Unable to open offline adapter: bad dump file format"

I'm trying to read a pcap file that was created with TShark 1.10.6 with libpcap version 1.4.0 on FreeBSD 9.2, and am doing this on Windows 7 with c# in Visual Studio, SharpPcap 4.2, PacketDotNet 0.13 and WinPcap 4.1.3. The exception being raised is…
Alan
  • 3,715
  • 3
  • 39
  • 57
2
votes
3 answers

Does winpcap and sharppcap support the pcap-ng format

I've a file in the pcapng format and want to open it by SharpPcap - that doesn't work. SharpPcap uses Winpcap (libpcap). So my question: Does WinPcap and/or SharpPcap support the pcap-ng format at the moment or in future? I can't find some current…
Stampy
  • 456
  • 7
  • 27
2
votes
1 answer

PcapIpAddress returns 0.0.0.0

I am using the following library: Tamir.IPLib.SharpPcap.dll version 1.0.2.0. Running the Tamir.IPLib.Test.Example1, that is (in very short): PcapDeviceList devices = SharpPcap.GetAllDevices(); if(devices.Count<1) { Console.WriteLine("No device…
2
votes
2 answers

sending http post packet using sharppcap or packetdotnet

For testing reasons, I'm trying to generate a http packet with different source IP address and post it to a destination. I'm going to use sharppcap or packetdotnet. Found good samples here:…
Afshin Gh
  • 7,918
  • 2
  • 26
  • 43
2
votes
2 answers

Loading a pcap file

I am trying to write a tcp reconstruction program in c# , by using SharpPcap. So far I am doing a pretty good job, and the reconstruction is working fine. My only problem is, that in order to reconstruct big Pcap files by myself, I need to load them…
2
votes
1 answer

SharpPcap - how to distinguish income/outgoing packets?

Introduction: This question is about packet sniffing/sending using SharpPcap. Well actually the main ideea is: There is a client application which communicates with a server side. I have made a sniffer which logs all the (specified by my filter)…
Cristian E.
  • 3,116
  • 7
  • 31
  • 61
2
votes
1 answer

How can i properly parse a RAW(Raw Ip) packet with C#?

I need to parse a pcap file in C# that was generated in Wireshark. Of course it opens fine with wireshark and shows all packets as expected. I have tried to work with two popular libraries (Pcap.Net and Packet.net from SharpPcap) I've found online,…
brianestey
  • 8,202
  • 5
  • 33
  • 48
1
2
3
8 9