Class: Ronin::Recon::Values::Mailserver

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

Overview

Represents a discovered mailserver.

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:mailserver

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:

  • (:mailserver)


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

def self.value_type
  :mailserver
end

Instance Method Details

#as_jsonHash{Symbol => Object}

Coerces the mailserver value into JSON.

Returns:

  • (Hash{Symbol => Object})

    The Ruby Hash that will be converted into JSON.



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

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