File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 29
29
exit
30
30
end
31
31
32
- unless ( Pcap . respond_to? ( :lookupaddrs ) and
33
- Pcap . respond_to? ( :interfaces ) and
34
- Pcap . respond_to? ( :addresses ) )
35
- $stderr. puts "Error: Looks like you are not running the latest version of pcaprub"
32
+ unless (
33
+ NetworkInterface . respond_to? ( :interfaces ) and
34
+ NetworkInterface . respond_to? ( :addresses ) and
35
+ NetworkInterface . respond_to? ( :interface_info )
36
+ )
37
+ $stderr. puts "Error: Looks like you are not running the latest version of NetworkInterface"
36
38
exit
37
39
end
38
40
found = false
39
- Pcap . interfaces . each_with_index do |iface , i |
41
+ NetworkInterface . interfaces . each_with_index do |iface , i |
40
42
found = true
41
- detail = Pcap . interface_info ( iface )
42
- addr = Pcap . addresses ( iface )
43
+ detail = NetworkInterface . interface_info ( iface )
44
+ addr = NetworkInterface . addresses ( iface )
43
45
puts "#" * 70
44
46
puts ""
45
47
puts "INDEX : " + ( i + 1 ) . to_s
You can’t perform that action at this time.
0 commit comments