Questions tagged [pcap.net]

Pcap.Net is a .NET wrapper for WinPcap written in C++/CLI and C#. It Features almost all WinPcap features and includes a packet interpretation framework.

Pcap.Net is a .NET wrapper for WinPcap written in C++/CLI and C#. It Features almost all WinPcap features and includes a packet interpretation framework. See http://pcapdot.net

139 questions
0
votes
1 answer

C# pcapdotnet ReceivePackets use device in callback

I am trying to make a program that will receive packets on multiple network devices and send them on other devices (something like software hub). I am using C# and pcapdotnet. This simple method captures communication on device: public void…
aron23
  • 293
  • 2
  • 3
  • 11
0
votes
0 answers

Opening a website in browser using Pcap.Net c#

My aim is to open a website in browser with IP spoofing. In other words I want to open a website with the IP of my choice. I am creating a desktop application in c# .net. I have read that I need to use 3 way handshake for this kind of…
rupareliab
  • 159
  • 1
  • 3
  • 15
0
votes
1 answer

From C++ to C# with Pcap files

I have a program written in C++ and I have to convert it to C#. This program reads some pcap files. I have add a reference to the PcapDotNet library in my new C# project but the types are not the same as in C++, like: pcap_t *fp; char[] errbuf =…
ayasha
  • 1,221
  • 5
  • 27
  • 46
0
votes
1 answer

BPF/Wincap filter not working in Pcap.net

I'm using a pcap.net process to broadcast out a packet, and listen in for a response. I want the response packets that it accepts to be a certain length. However, whenever I add a filter it only returns packets of length 100. Here's the code: '…
Kat
  • 2,460
  • 2
  • 36
  • 70
0
votes
1 answer

How can I get the gateway/router address from a pcap.net packet?

This probably has a very obvious answer, but what is the common way to get the router/gateway IP address of the packet I just received in pcap.net? I know how to get the IP address source: packet.Ethernet.IpV4.Source.ToString() I tried…
Kat
  • 2,460
  • 2
  • 36
  • 70
0
votes
1 answer

Capturing packet through Ethernet using Pcap

I am building a GUI to capture packets through Ethernet. I want pass the received packet in the form of Byte[] and its length through a function for its further processing (to extract various information about Ethernet, IPv4 and UDP protocols). so…
rkt_167
  • 7
  • 3
0
votes
1 answer

How to increase processor utilize for a specific action

I have application that using PcapDotNet DLLs and send packets. In some Pcap files with high speed rate (~50 Mbit/Sec or ~9000 Packet per seconds) the play takes long time compare to the original Pcap length\duration and I can see that ~25% of my …
user3328870
  • 341
  • 2
  • 7
  • 23
0
votes
1 answer

pcap.net .exe error with dll

I have a program using pcap.net. It works well when I am launching it from the developer, but fails completely when I use the exe. Here's what I've done and the exception: Add existing item to project (PcapDotNet.base.dll, .core.dll,…
Kat
  • 2,460
  • 2
  • 36
  • 70
0
votes
1 answer

Extract layers recursively (w/o knowing how many there are in a packet)

I need to make a tool that modifies the VLanTaggedFrame.VLanIdentifier in a packet. The problem is, my packets may have multiple vlan tags. realistically it’s between 1~3 tags but I want to make a recursive procedure and not make a chain of if…
0
votes
1 answer

Set the UDP/TCP checksum to null on PcapDotNet

I using this project DLLs and after change IP Address: private Packet ChangePacketIp(Packet packet, IpV4Address oldIpAddress, IpV4Address newIpAddress) { try { EthernetLayer ethernet = (EthernetLayer)packet.Ethernet.ExtractLayer(); …
user3328870
  • 341
  • 2
  • 7
  • 23
0
votes
1 answer

After change packet IP Address using PcapDotNet DLLs also additional value except the packet IP Address changed

I am using PcapDotNet DLLs in my application and while changing packet IP Address and it seems that another value is changed except the IP Address. This is how i am change the IP Address: private Packet ChangePacketIp(Packet packet, IpV4Address…
user3328870
  • 341
  • 2
  • 7
  • 23
0
votes
2 answers

Make a network interface receive (hear) a packet

I need to make Microsoft Loopback Adapter receive (hear) a packet using PcapDotNet or anything else. How can I do that? Thanks.
Ali Momen Sani
  • 840
  • 2
  • 11
  • 26
0
votes
1 answer

prevent windows from sending destination port unreachable when getting ping reply

I have implemented a ping request with pcap.net. Everything is working fine but when the destination replies with a icmp echo response windows immediatly sends an icmp destination port unreachable. me other host | | |---------->|…
Firo
  • 30,626
  • 4
  • 55
  • 94
0
votes
1 answer

Split packet into 2 packets with pcapdotnet

How can I split a packet into two packets using pcapdotnet? This is what I tried, but I don't know whether it's correct: public IEnumerable splitPacket(Packet packet) { EthernetLayer ethernet =…
user1269592
  • 691
  • 3
  • 12
  • 24
0
votes
1 answer

Why doesn't wireshark recognize the http text in my tcp request?

I'm trying to send http data over a custom made pcap.net based tcp client. Normally, when I send request via browser, in wireshark it looks like this: However, when I send the same data over TCP myself, in wireshark the request looks like…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
1 2 3
9
10