/nessus.rb

A Ruby client for the Nessus 5.0 REST API

Primary LanguageRubyMIT LicenseMIT

Nessus

Build Status

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'nessus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nessus

Usage

require gems

	require 'rubygems'
	require 'nessus'

Connecting using a SSL cert

	# create a client, but dont login yet.
    # nil nil are username and password respectivly.
	client = Nessus::Client.new(
	    "https://00.10.010.110:8834", 
    	nil, 
	    nil, 
    	{ ssl: { :ca_file => '/path/to/cacert.pem'}})	
        
    
    # now login
    client.login("user", "pwd") 
    
    # Check if authenticated
    puts client.authenticated? 
    

Where /path/to/cacert.pem is the full path to a local copy of /opt/nessus/com/nessus/CA/cacert.pem on the machine running the Nessus server

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request