-
Notifications
You must be signed in to change notification settings - Fork 103
Getting started on Ubuntu
The following assumes you are using a non-root terminal. Nexpose gem requires at least Ruby 2.1.x and is known to work on Ruby 2.2x and Ruby 2.3.x.
The simplest way to install Ruby with RVM is to run the following command, as a non-root user and without sudo:
\curl -sSL https://get.rvm.io | bash -s stable --ruby
- Check the Ruby version with
ruby --version
The above command will install the latest release of Ruby.
For more information on RVM installation see http://rvm.io/rvm/install
- Enter the following command:
gem install nexpose --no-ri --no-rdoc
- The no-ri and no-rdoc options reduce download size for the Rex dependencies
- If you get a permission denied error, you might need to source the RVM script with
source ~/.rvm/scripts/rvm
- If you need a specific version of the gem, use
gem install nexpose:1.0.0
replacing1.0.0
with the desired version
- Check the Nexpose gem version(s) installed:
gem list | grep nexpose
This section is optional, but recommended for new users of the gem to make sure it's working correctly.
- In your terminal run
irb
to launch the Ruby interpreter - Enter the following lines to load the Nexpose gem and setup a connection to a Nexpose Security Console
require 'nexpose'
nsc = Nexpose::Connection.new('localhost', 'nxadmin', 'nxpassword')
Note: Be sure to set the correct hostname or IP address, username, and password for your Nexpose Security Console.
Enter the following lines to log in to Nexpose and list all sites
nsc.login
nsc.list_sites
When you're finished interacting with a Nexpose session, you should log out to ensure the session is freed up
nsc.logout
exit
Project Home 🔹 Release Notes 🔹 Wiki 🔹 Issues 🔹 Pull Requests