Top Level Namespace

Instance Method Summary (collapse)

Instance Method Details

- (Connection) NexposeLogin(consoleIP)

Log into a Nexpose console. Returns a connection object.

Parameters:

  • consoleIP (String)

    the IP address of the Nexpose console.

Returns:

  • (Connection)

    the connection object.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib\nexpose-functions.rb', line 9

def NexposeLogin(consoleIP)
    require "io/console"

    print "Username: "
    username = $stdin.gets.chomp
    print "Password: "
    password = STDIN.noecho(&:gets).chomp
    puts ""

    # Create connection and login.
    nsc = Nexpose::Connection.new(consoleIP, username, password)
    nsc.
    return nsc
end