#!/usr/bin/env ruby require 'packetfu' require 'pry' # iface becomes the default routeable interface #iface = PacketFu::Utils.default_int iface = "lo" # cap starts capturing packets on iface cap = PacketFu::Capture.new(:iface => iface, :start => true) cap.bpf(:filter => "icmp") # will parse packets providing summary data of packet contents cap.stream.each do | packet | binding.pry puts PacketFu::Packet.parse(packet).peek end
Comments
0 B
|👍
/👎
0 B
|👍
/👎