File: ifconfig.rb

package info (click to toggle)
ruby-packetfu 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,520 kB
  • sloc: ruby: 8,344; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 286 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# -*- coding: binary -*-
# Usage:
# ruby examples/ifconfig.rb

# Path setting slight of hand:
$: << File.expand_path("../../lib", __FILE__)
require 'packetfu'

iface = ARGV[0] || PacketFu::Utils.default_int
config = PacketFu::Utils.ifconfig(iface)
print "#{RUBY_PLATFORM} => "
p config