Skip to content

Instantly share code, notes, and snippets.

@castaneai
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save castaneai/98b087ae14a4d1ef5689 to your computer and use it in GitHub Desktop.

Select an option

Save castaneai/98b087ae14a4d1ef5689 to your computer and use it in GitHub Desktop.
sharppcap + F#
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