Class: HiddenHippo::Extractors::DnsLlmnrExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/hidden_hippo/extractors/dns_llmnr_extractor.rb

Instance Method Summary collapse

Constructor Details

#initialize(queue) ⇒ DnsLlmnrExtractor

Returns a new instance of DnsLlmnrExtractor.



6
7
8
# File 'lib/hidden_hippo/extractors/dns_llmnr_extractor.rb', line 6

def initialize(queue)
  @queue = queue
end

Instance Method Details

#call(packet) ⇒ Object



10
11
12
13
14
15
# File 'lib/hidden_hippo/extractors/dns_llmnr_extractor.rb', line 10

def call(packet)
  return unless packet.udp_dest_port == 5355
  return unless packet.request?

  @queue << Update.new(packet.mac_src, {hostname: packet.dns_qry_name})
end