Class: BetterCap::Network::NdpReader

Inherits:
Object
  • Object
show all
Defined in:
lib/bettercap/network/ndp_reader.rb

Overview

This class is responsible for reading the computer ARP table.

Class Method Summary collapse

Class Method Details

.find_address(address) ⇒ Object

Parse the Ndp cache searching for the given IP address and return its MAC if found, otherwise nil.



7
8
9
10
11
12
13
14
# File 'lib/bettercap/network/ndp_reader.rb', line 7

def self.find_address( address )
  self.parse_cache(address) do |ip,mac|
    if ip == address
      return mac
    end
  end
  nil
end