Last active
August 29, 2015 14:27
-
-
Save castaneai/98b087ae14a4d1ef5689 to your computer and use it in GitHub Desktop.
sharppcap + F#
This file contains hidden or 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
| open SharpPcap | |
| type Sniffer() = | |
| let device = (CaptureDeviceList.Instance |> Seq.head) | |
| member this.Start() = device.Open() | |
| member this.GetNextPacket() = device.GetNextPacket() | |
| module Main = | |
| [<EntryPoint>] | |
| let main argv = | |
| let s = Sniffer() | |
| s.Start() | |
| s.GetNextPacket() | |
| 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment