Port model
Build ports.
Build ports
Parameters:
Returns:
20 21 22 23 24
# File 'lib/mihari/models/port.rb', line 20 def build_by_ip(ip, enricher: Enrichers::Shodan.new) enricher.result(ip).fmap do |res| (res&.ports || []).map { |port| new(port:) } end.value_or [] end