Sha256: c8cf4e547d574c1be9ff082f3f00b6bf5f6b565a7f8725e026380699ba32987c

Contents?: true

Size: 779 Bytes

Versions: 8

Compression:

Stored size: 779 Bytes

Contents

module Nmap
  class Scan

    # The type of scan
    attr_reader :type

    # The protocol used for the scan
    attr_reader :protocol

    # The port numbers that were scanned
    attr_reader :services

    #
    # Creates a new Scan object.
    #
    # @param [Symbol] type
    #   The type of the scan.
    #
    # @param [Symbol] protocol
    #   The protocol used for the scan.
    #
    # @param [Array<Integer, Rage>] services
    #   The port numbers scanned.
    #
    def initialize(type,protocol,services=[])
      @type = type
      @protocol = protocol
      @services = services
    end

    #
    # Converts the scan to a String.
    #
    # @return [String]
    #   The String form of the scan.
    #
    def to_s
      "#{@protocol} #{@type}"
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby-nmap-0.5.1 lib/nmap/scan.rb
ruby-nmap-0.5.0 lib/nmap/scan.rb
ruby-nmap-0.4.1 lib/nmap/scan.rb
ruby-nmap-0.4.0 lib/nmap/scan.rb
ruby-nmap-0.3.0 lib/nmap/scan.rb
ruby-nmap-0.2.0 lib/nmap/scan.rb
ruby-nmap-0.1.1 lib/nmap/scan.rb
ruby-nmap-0.1.0 lib/nmap/scan.rb