Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am kanny on github.
  • I am kanny (https://keybase.io/kanny) on keybase.
  • I have a public key whose fingerprint is 6731 506F DDC8 55D5 BB3A 7229 D90D 715D 9312 E970

To claim this, I am signing this object:

@kanny
kanny / packetfu-syn.rb
Created January 26, 2012 16:39
Example for using PacketFu (dump TCP-SYN packets)
#!/usr/bin/env ruby
require 'rubygems'
require 'packetfu'
# Set interface (Default: en0)
iface = ARGV[0] || "en0"
cap = PacketFu::Capture.new(:iface => iface, :start => true, :promisc => true)
cap.stream.each do |p|
pkt = PacketFu::Packet.parse(p)