Last active
August 31, 2016 23:32
-
-
Save cameronelliott/33e9569e3d8aa1c7d505c2fdaaeab1ec to your computer and use it in GitHub Desktop.
Sharppcap Live Packet filtering using BPF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var devices = CaptureDeviceList.Instance; | |
devices.Select (z=>z.Description).Dump(); | |
WinPcapDevice d = (WinPcapDevice )devices.First(z=>z.Description.Contains("Ethernet")); | |
d.Open(SharpPcap.WinPcap.OpenFlags.NoCaptureLocal,0); | |
d.Filter="port 80"; | |
WinPcapDevice.GetSequence(d).Take(10).Dump(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment