Class: Mihari::Services::PortBuilder
- Inherits:
-
Mihari::Service
- Object
- Mihari::Service
- Mihari::Services::PortBuilder
- Defined in:
- lib/mihari/services/builders.rb
Overview
Port builder
Instance Method Summary collapse
Methods inherited from Mihari::Service
Instance Method Details
#call(ip, enricher: Enrichers::Shodan.new) ⇒ Array<Mihari::Models::Port>
Build ports
115 116 117 118 119 |
# File 'lib/mihari/services/builders.rb', line 115 def call(ip, enricher: Enrichers::Shodan.new) enricher.result(ip).fmap do |res| (res&.ports || []).map { |port| Models::Port.new(port: port) } end.value_or [] end |