Sha256: 5513a7d094185ea7567d073107e2dbde551df372fe7236025410d77506a42fb1

Contents?: true

Size: 367 Bytes

Versions: 6

Compression:

Stored size: 367 Bytes

Contents

module Censys
  class Document
    module HasServices
      #
      # Open ports.
      #
      # @return [Hash{String => Hash}]
      #
      def ports
        @ports ||= Hash[@attributes.select { |key, _| key =~ /\A\d+\z/ }]
      end

      #
      # @return [Array<String>]
      #
      def protocols
        @attributes['protocols']
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
censu-0.1.6 lib/censys/document/has_services.rb
censu-0.1.5 lib/censys/document/has_services.rb
censu-0.1.4 lib/censys/document/has_services.rb
censu-0.1.3 lib/censys/document/has_services.rb
censu-0.1.2 lib/censys/document/has_services.rb
censu-0.1.1 lib/censys/document/has_services.rb