lib/ronin/recon/cli/printing.rb in ronin-recon-0.1.0.rc1 vs lib/ronin/recon/cli/printing.rb in ronin-recon-0.1.0.rc2
- old
+ new
@@ -31,21 +31,21 @@
include Core::CLI::Logging
# Mapping of {Value} classes to printable names.
VALUE_CLASS_NAMES = {
Values::Domain => 'domain',
+ Values::Mailserver => 'mailserver',
+ Values::Nameserver => 'nameserver',
+ Values::Wildcard => 'wildcard host name',
Values::Host => 'host',
Values::IP => 'IP address',
Values::IPRange => 'IP range',
- Values::Mailserver => 'mailserver',
- Values::Nameserver => 'nameserver',
Values::OpenPort => 'open port',
Values::Cert => 'SSL/TLS certificate',
- Values::EmailAddress => 'email addresse',
- Values::URL => 'URL',
Values::Website => 'website',
- Values::Wildcard => 'wildcard host name'
+ Values::URL => 'URL',
+ Values::EmailAddress => 'email addresse'
}
#
# Converts the value class into a printable name.
#
@@ -64,40 +64,41 @@
end
#
# Formats a value object into a human readable string.
#
- # @param [Values::Value] value
+ # @param [Value] value
# The value object to format.
#
# @return [String]
# The formatted value.
#
# @raise [NotImplementedError]
# The given value object was not supported.
#
def format_value(value)
case value
- when Values::Domain then "domain #{value}"
- when Values::Mailserver then "mailserver #{value}"
- when Values::Nameserver then "nameserver #{value}"
- when Values::Host then "host #{value}"
- when Values::IP then "IP address #{value}"
- when Values::IPRange then "IP range #{value}"
- when Values::OpenPort then "open #{value.protocol.upcase} port #{value}"
- when Values::Cert then "SSL/TLS certificate #{value.subject}"
- when Values::URL then "URL #{value}"
- when Values::Website then "website #{value}"
- when Values::Wildcard then "wildcard host name #{value}"
+ when Values::Domain then "domain #{value}"
+ when Values::Mailserver then "mailserver #{value}"
+ when Values::Nameserver then "nameserver #{value}"
+ when Values::Wildcard then "wildcard host name #{value}"
+ when Values::Host then "host #{value}"
+ when Values::IP then "IP address #{value}"
+ when Values::IPRange then "IP range #{value}"
+ when Values::OpenPort then "open #{value.protocol.upcase} port #{value}"
+ when Values::Cert then "SSL/TLS certificate #{value.subject}"
+ when Values::Website then "website #{value}"
+ when Values::URL then "URL #{value}"
+ when Values::EmailAddress then "email address #{value}"
else
raise(NotImplementedError,"value class #{value.class} not supported")
end
end
#
# Prints a newly discovered value.
#
- # @param [Values::Value] value
+ # @param [Value] value
# The value to print.
#
# @param [Value, nil] parent
# The optional parent value.
#