Class: Ronin::Recon::Values::Nameserver

Inherits:
Host show all
Defined in:
lib/ronin/recon/values/nameserver.rb

Overview

Represents a discovered DNS nameserver.

Instance Attribute Summary

Attributes inherited from Host

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Host

#===, #eql?, #hash, #initialize, #to_s

Methods inherited from Ronin::Recon::Value

#==, parse, #to_csv, #to_json, #to_s

Constructor Details

This class inherits a constructor from Ronin::Recon::Values::Host

Class Method Details

.value_type:nameserver

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Note:

This is used internally to map a recon value class to a printable type.

Returns the type or kind of recon value.

Returns:

  • (:nameserver)


54
55
56
# File 'lib/ronin/recon/values/nameserver.rb', line 54

def self.value_type
  :nameserver
end

Instance Method Details

#as_jsonHash{Symbol => Object}

Coerces the nameserver value into JSON.

Returns:

  • (Hash{Symbol => Object})

    The Ruby Hash that will be converted into JSON.



39
40
41
# File 'lib/ronin/recon/values/nameserver.rb', line 39

def as_json
  {type: :nameserver, name: @name}
end