Module: Ronin::Exploits::Metadata::DefaultPort::ClassMethods

Defined in:
lib/ronin/exploits/metadata/default_port.rb

Overview

Class-methods.

Instance Method Summary collapse

Instance Method Details

#default_port(new_default_port = nil) ⇒ Integer?

Gets or sets the exploit's default port.

Examples:

default_port 143

Parameters:

  • new_default_port (Integer, nil) (defaults to: nil)

    The optional new default port number to set.

Returns:

  • (Integer, nil)

    The exploit's default port number.



60
61
62
63
64
65
66
67
68
# File 'lib/ronin/exploits/metadata/default_port.rb', line 60

def default_port(new_default_port=nil)
  if new_default_port
    @default_port = new_default_port
  else
    @default_port ||= if superclass.kind_of?(ClassMethods)
                        superclass.default_port
                      end
  end
end