Class: Ronin::Recon::Net::ServiceID

Inherits:
Worker
  • Object
show all
Defined in:
lib/ronin/recon/builtin/net/service_id.rb

Overview

A recon worker that identifies services on open ports.

Instance Method Summary collapse

Methods inherited from Worker

accepts, concurrency, #initialize, intensity, outputs, register, run

Constructor Details

This class inherits a constructor from Ronin::Recon::Worker

Instance Method Details

#process(open_port) {|new_value| ... } ⇒ Object

Identifies the service running on an open port.

Parameters:

Yields:

  • (new_value)

    The identified service will be yielded.

Yield Parameters:



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/ronin/recon/builtin/net/service_id.rb', line 55

def process(open_port)
  case open_port.service
  when 'domain'
    yield Nameserver.new(open_port.host)
  when 'smtp'
    yield Mailserver.new(open_port.host)
  when 'http'
    if open_port.ssl?
      yield Website.https(open_port.host,open_port.number)
    else
      yield Website.http(open_port.host,open_port.number)
    end
  when 'https', 'https-alt'
    yield Website.https(open_port.host,open_port.number)
  end
end