Module: Censys::Document::HasServices

Defined in:
lib/censys/document/has_services.rb

Instance Method Summary collapse

Instance Method Details

#portsHash{String => Hash}

Open ports.

Returns:

  • (Hash{String => Hash})


11
12
13
# File 'lib/censys/document/has_services.rb', line 11

def ports
  @ports ||= Hash[@attributes.select { |key, _| key =~ /\A\d+\z/ }]
end

#protocolsArray<String>

Returns:

  • (Array<String>)


18
19
20
# File 'lib/censys/document/has_services.rb', line 18

def protocols
  @attributes['protocols']
end