Skip to content

Instantly share code, notes, and snippets.

@larrylv
Last active April 27, 2016 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larrylv/9a84e2ea301af8bc8c2dbdb83f37863b to your computer and use it in GitHub Desktop.
Save larrylv/9a84e2ea301af8bc8c2dbdb83f37863b to your computer and use it in GitHub Desktop.
tcp-stack-blog
require 'packetfu'
cap = PacketFu::Capture.new(
iface: config[:iface],
start: true,
filter: "tcp and src 216.58.221.142"
)
cap.stream.each do |pkt|
# parse pkt and decide what to do next
puts pkt
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment