class Nexpose::External::Service

A service endpoint on an asset.

Attributes

name[RW]

Name of the service. [Optional]

port[RW]

Port on which the service is running.

protocol[RW]

Protocol used to communicate to the port. @see Service::Protocol.

vulnerabilities[RW]

Vulnerabilities specific to this service endpoint.

Public Class Methods

new(port, protocol = Protocol::RAW, name = nil) click to toggle source
# File lib/nexpose/external.rb, line 145
def initialize(port, protocol = Protocol::RAW, name = nil)
  @port            = port
  @protocol        = protocol
  @name            = name
  @vulnerabilities = []
end

Public Instance Methods

to_h() click to toggle source
# File lib/nexpose/external.rb, line 152
def to_h
  { name: name,
    port: port,
    protocol: protocol,
    vulnerabilities: vulnerabilities.map(&:to_h) }
end