metasploit-framework/external/ruby-pcapx/examples/test.rb

11 lines
166 B
Ruby
Raw Normal View History

#!/usr/local/bin/ruby
require 'pcap'
dev = Pcap.lookupdev
cap = Pcap::Capture.open_live(dev)
cap.setfilter("ip")
cap.loop do |pkt|
print pkt, "\n"
end
cap.close