mahdooglej icon

Untitled

mahdooglej | PRO | 02/08/19 04:13:54 PM UTC | 0 ⭐ | 6815 👁️ | Never ⏰ | []
Ruby |

440 B

|

None

|

0 👍

/

0 👎

#!/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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎