Last active
November 6, 2016 00:49
-
-
Save picatz/bd5f386ee1b739bc5d0f4386ac1e611f to your computer and use it in GitHub Desktop.
An example of using packetfu and pry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'packetfu' | |
require 'pry' | |
iface = PacketFu::Utils.default_int | |
cap = PacketFu::Capture.new(:iface => iface, :start => true) | |
cap.stream.each do | packet | | |
# will dump you into a pry repl | |
binding.pry | |
end | |
# => example output ... | |
# From: /path/to/packetfu_and_pry.rb @ line 9 : | |
# | |
# 3: | |
# 4: iface = PacketFu::Utils.default_int | |
# 5: cap = PacketFu::Capture.new(:iface => iface, :start => true) | |
# 6: | |
# 7: cap.stream.each do | packet | | |
# => 8: binding.pry | |
# 9: end | |
# | |
# [1] pry(main)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment