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

How can I create HttpResponseDatagram and HttpResponseLayer in pcap.net

I cant create these objects in pcap.net IpV4Datagram ip = packet.Ethernet.IpV4; TcpDatagram tcp = ip.Tcp; HttpDatagram http = tcp.Http; // HttpResponseDatagram resdat=http.; How can i create them? // HttpResponseLayer…
0
votes
1 answer

TCP HTTP Gzip String Decompression C#

I'm working on a project about packet listening. I got a problem with gzip decompression. There is the code: private static string gzipDecompress(TcpDatagram tcp) { if (tcp.Http.Header != null) { MemoryStream ms =…
0
votes
1 answer

Port scanner - icmp packets

I wrote a UDP port scanner. I send a packet to another device in the same network but over here is a little problem, why wireshark receives only one packet if I send 10 packets on different ports(each one port is closed). I should receive 10 ICMP…
Mroczny Arturek
  • 419
  • 1
  • 8
  • 22
0
votes
1 answer

Pcapdotnet: capturing wifi traffic

I'm trying to use Pcapdotnet to capture network traffic. I've been following the official tutorial up to this point https://github.com/PcapDotNet/Pcap.Net/wiki/Pcap.Net-Tutorial-Interpreting-the-packets The problem is, this tutorial only tells you…
0
votes
1 answer

C# Pcap.net PacketDeviceOpenAttributes.NoCaptureLocal is capturing sent packets

Can anyone help me please? I'm using PacketDeviceOpenAttributes.NoCaptureLocal flag in PacketCommunicator and a when I send packet, my communicator is always capturing my packet as received packet. Thank you.
Simon Štefunko
  • 33
  • 1
  • 10
0
votes
1 answer

Can't send udp packet with pcapdotnet

My code has shown below: i already setup winpcap too. There arent any problem with programs which used by pcapdotnet i think problem should be in layers but i dont know very well. Console.Write("\r IP:Port = "); string[] answer =…
0
votes
1 answer

How to define a custom private ethernetType in pcap.net

pcap.net support some public ethernetType in its enum EthernetType There are serval ether type values listed above dedicated for IPV4,IPV6 and ARP protocol types. For IPV4, ether type = 0x0800. But how to define a custome private etherType(for…
lrouter
  • 349
  • 1
  • 5
  • 20
0
votes
1 answer

How to capture packages from open wi-fi hotspot using SharpPcap or Pcap.NET?

I can capture packets sent from my computer, but I can't capture packets from other attached devices to wi-fi Sorry for my bad English
Roman Kiyashev
  • 150
  • 1
  • 11
0
votes
1 answer

C# : Resolve IP into host name when a host has more than 1 ip

This is my first ever question on StackOverflow. So, if there are any mistakes, please ignore them. If you're facing problem to understand my question, please let me know, I'll try me best to explain my problem :) . Currently I'm trying to create a…
kots_14
  • 141
  • 2
  • 10
0
votes
1 answer

How to build a Ethernet Packet without any protocole Pcap.net c#?

I follow this tutorial PcapDotNet/Pcap.Net. But I will try to build a packet like this picture Ethernet frame. private static Packet BuildEthernetPacket() { EthernetLayer ethernetLayer = new EthernetLayer { …
In Volt
  • 3
  • 1
0
votes
1 answer

How can I get the MAC address of a catched packet?

I'm trying to build kind of a sniffer to catch wifi probe requests. With Wireshark, I simply set a filter like eth.type eq 0x0806 and eth.dst eq ff:ff:ff:ff:ff:ff that tells me I'm listening on the ARP protocol all the broadcast packets. I haven't…
GuillaumeA
  • 3,493
  • 4
  • 35
  • 69
0
votes
0 answers

Send packets through internet using Pcapdotnet

I want to use pcapdotnet to send packet to my free web site, but there are no packets received, can any one tell me where is my fault, my web site address: www.infinitypower.somee.com I use ping to get the ip address: 204.27.56.226 the code: using…
0
votes
1 answer

pcap.net mac address setting

I'm setting up a program to send a UDP packet from one server to another on a different network. I'm having trouble setting up the EthernetLayer, I've managed to set the source MacAddress to my own using: public static string GetMacAddress() …
user1372896
  • 542
  • 1
  • 10
  • 27
0
votes
2 answers

how to check for BackgroundWorker.CancellationPending when my thread has called another?

How should I check for a CancellationPending within a BackgroundWorker DoWork method, when within this method I call off to a Pcap.Net packet capture routine, which responses via a callback. The two options I can think of is: a) write a loop at the…
Greg
  • 34,042
  • 79
  • 253
  • 454
0
votes
0 answers

Using Pcap.Net with thread throws 'System.NullReferenceException'

I have this method: public void rc() { try{ using (PacketCommunicator communicator = device1.Open(65536, PacketDeviceOpenAttributes.Promiscuous, 1000)) { richTextBox1.AppendText("Listening on " + device1.Description +…
Tomáš Čičman
  • 281
  • 1
  • 5
  • 17