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
1
vote
1 answer

How cab I get MAC address of a selected device in pcap.net

How can I get MAC address of a selected LivePacketDevice in pcap.net? var allDevices = LivePacketDevice.AllLocalMachine; LivePacketDevice dev = allDevices[0];
StarWind
  • 15
  • 6
1
vote
1 answer

change ip in pcap.net C#

I want some problem with Pcap.net to chane Ip adress I found this code i try this code in C# : private Packet ChangePacketIp(Packet packet, string oldIpAddress, string newIpAddress) { try { EthernetLayer ethernet =…
Simko
  • 45
  • 8
1
vote
1 answer

Capturing DNS responses with PCap.Net?

Q1 - Is it possible to capture DNS request/responses with the library? Q2 - If yes, once I have the packet does anyone have any sample code that shows how I could extract the fields from the DNS response? In particular the IP address that DNS…
Greg
  • 34,042
  • 79
  • 253
  • 454
1
vote
1 answer

How can I recognize ICMP/ARP packets in pcap.net/SharpPcap?

So this is really strange. I've tried multiple expressions but I have not yet found a proper boolean expression to recognize if a packet is an ICMP or ARP packet. I've tried packet.ipv4.icmp != null which resulted in the program entering the block…
Foxman
  • 189
  • 13
1
vote
2 answers

How can I get the MAC/IP address of a packet device in pcap.net/SharpPcap?

I'm using the PacketDevice or LivePacketDevce in order to send and receive packets. I have 2 network interfaces that I have to use and I can't find an attribute of Packet Device that has it's MAC or IP address. It's a problem using the destination…
Foxman
  • 189
  • 13
1
vote
1 answer

Pcap.Net PacketCommunicator.Dispose() close my application without any error

I am using Pcap.Net take Pcap File and transmit all it's packet through my machine Network Adapter. So in order to do that i am using the code example Sending packets using Send Buffer: class Program { static void Main(string[] args) …
berry wer
  • 637
  • 2
  • 12
  • 25
1
vote
1 answer

PcapDotNet An attempt was made to load a program with > an incorrect format

I'm attempting to use the pcapDotNet library to my project, however, I get an exception when launching the appliction. I'm using Visual Studio 2010, winpcap 4.1.3 and PcapDotNet 1.0.2.21772. The exception is: Could not load file or assembly…
Ahmad
  • 906
  • 11
  • 27
1
vote
2 answers

Should I use .NET 4.0 Tasks in a library?

I'm writing a .NET 4.0 library that should be efficient and simple to use. The library is used by referencing it and using its different classes. Should I use .NET 4.0 Tasks tot make things more efficient internally? I fear that it might make the…
brickner
  • 6,595
  • 3
  • 41
  • 54
1
vote
1 answer

check if TcpLayer or udpLayer is not null

i am using pcap.net to read packets from a pcap file and save them to new pcap file after anonymization(change some fields). i have a problem. some pcap files have incorrect or incomplete packets e.g they have not tcp layer or payload. i want to…
Fateme E
  • 31
  • 1
  • 5
1
vote
1 answer

Get Packete url using Pcap.Net

I need to find a way to get all HTTPS packet from PCAP file Is it Ok if i'll take only TCp packets with port 443 (source or destination) or i need to check somewhere inside the packet (where ?) the URL ?
Mike Maggy
  • 93
  • 2
  • 14
1
vote
1 answer

Pcap.Net Get gateway address

I'm currently working on a MITM-Project with Pcap.Net but now I'm stuck. To keep it short, I need to get the default gateway address of my selected LivePacketDevice. Is there an easy way to do this, because I didn't find anything. Thanks Termi
Daniel Z.
  • 2,988
  • 2
  • 19
  • 23
1
vote
1 answer

How could I make a mDNS Query with Pcap.net?

Problem: I'm looking to make a mDNS packet, while having searching stackflow for options. I tried bonjour and some wrappers but had very limited success, especially when I requested a second time and get socket binding complaints (Which, of course,…
Kat
  • 2,460
  • 2
  • 36
  • 70
1
vote
0 answers

automatic browsing + ip spoofing using pcap.net

Using PCAP.NET, I want to automatic browse with the feature of changing ip address. I want to browse a website and send data to it (filling a form using POST) with different ip addresses each time. Automatic Browsing Someone suggested that I must…
1
vote
0 answers

C# & Pcap.Net - Forwarding received packets

First I'm using Visual Studio 2012 with C# and the Pcap.Net Library. I try to to forward packets which I captured before. What I try to do: Spoof ARP-Table of my phone. Redirect the traffic which normally goes to the gateway to my computer. Log the…
1
vote
2 answers

How to use Pcap.Net in my project?

I want to use Pcap.Net in my C# project. I download and add .dll references to the project. The project builds successfully but when I run it, the below exception occur. System.IO.FileNotFoundException was unhandled Message=Could not load file or…
Majid
  • 519
  • 1
  • 9
  • 21