I followed the guide at http://www.codeproject.com/KB/IP/sharppcap.aspx to implement a simple packet sniffer to automate authentication for me, I managed to go to the "Filtering" section, and still they had to make some adjustments to the tutorial code, but now I'm at a standstill.
The error I am getting is:
The best overloaded method match for 'PacketDotNet.TcpPacket.GetEncapsulated (PacketDotNet.Packet)' has some invalid arguments
Argument 1: Cannot be converted from "SharpPcap.RawCapture" to "PacketDotNet.Packet"
But I don't need to reference PacketDotNet yet (I still had SharpPcap).
All the code that I still have included, the problem is the device_OnPacketArrival () function.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using PacketDotNet; using SharpPcap; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string ver = SharpPcap.Version.VersionString; Console.WriteLine("SharpPcap {0}, Example1.IfList.cs", ver);
source share