OpenVAS OMP implementation in Ruby

Ruby library for OpenVAS manager interface. This library is used for communication with OpenVAS over OMP interface. You can start, stop, pause and resume scan. Watch progress and status of scan, download report, etc.

This library cannot communicate directly with OpenVAS scanner, as scanner uses (soon to be obsolete) OTP protocol. If you need to communicate directly with OpenVAS scanner, take a look at the ovasotp-ruby library. Still note that this should be bad practice anyway.

  • Requirements
  • Requirements are quite standard Ruby libraries for SSL and XML parsing:
    require 'socket'
    require 'timeout'
    require 'openssl'
    require 'rexml/document'
    require 'rexml/text'
    require 'base64'

  • Installation
  • If you have gem, you can basically say:
    gem install openvas-omp

  • Download
  • You can download library and command line example here
    You can reach RubyForge page here

  • Examples
  • How easy to write some scan?
    # require 'rubygems' # if using Ruby <1.9
    require 'openvas-omp'"user"=>'openvas',"password"=>'openvas')
    config=ov.config_get().index("Full and fast")
    target=ov.target_create({"name"=>"t", "hosts"=>"", "comment"=>"t"})
    taskid=ov.task_create({"name"=>"t","comment"=>"t", "target"=>target, "config"=>config})
    while not ov.task_finished(taskid) do
            puts "Status: #{stat['status']}, Progress: #{stat['progress']} %"
            sleep 10
    content=ov.report_get_byid(stat["lastreport"],'HTML')'report.html', 'w') {|f| f.write(content) }
    For full API/class documentation, visit rdoc documentation pages.

    You can see more ruby examples on wiki.

  • Documentation
  • For full API/class documentation of Ruby library, visit rdoc documentation pages.

  • Development
  • You can browse git tree here.
    To pull the 'openvas-omp' repository anonymously, use:
            git clone git://
    For some ideas, take a look at the TODO on git

  • OMP Protocol
  • So, far, there is only few sources of how OpenVAS OMP works: OMP change request on OpenVAS pages is one of the best ones.

    Feel free to contribute to the knowledge on wiki. Used wiki is UseModWiki and syntax is described here.

    Distributed under MIT license