Sha256: 64761e97f879c55b7861e4116f357ecbedf4e9cb6ac572e43d73ba0c7ec6ecd5

Contents?: true

Size: 183 Bytes

Versions: 6

Compression:

Stored size: 183 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'pcap'

dev = Pcap.lookupdev
cap = Pcap::Capture.open_live(dev)
cap.setfilter("ip")
cap.loop do |pkt|
    print pkt, "\n"
end
cap.close

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
ruby-pcap-0.8.1 examples/test.rb
ruby-pcap-0.8.0 examples/test.rb
ruby-pcap-0.7.9 examples/test.rb
ahobson-pcap-0.7.0 examples/test.rb
romanbsd-pcap-0.7.0 examples/test.rb
ruby-pcap-0.7.8 examples/test.rb