Skip to content

This Ruby gem is used for communication with GVM over GMP. You can start, stop, pause and resume scan. Watch progress and status of scan, download report, etc.

License

Notifications You must be signed in to change notification settings

evost/gvm-gmp-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gvm-gmp

This library is used for communication with Greenbone Vulnerability Manager (GVM, OpenVAS 10+) over GMP You can start, stop, pause and resume scan. Watch progress and status of scan, download report, etc.

Usage example

require ‘gvm-gmp’

gvm=GVMGMP::GVMGMP.new(“user”=>‘gvm’,“password”=>‘gvm’) config=gvm.config_get().index(“Full and fast”) target=gvm.target_create({“name”=>“t”, “hosts”=>“127.0.0.1”, “comment”=>“t”}) taskid=gvm.task_create({“name”=>“t”,“comment”=>“t”, “target”=>target, “config”=>config}) gvm.task_start(taskid) while not gvm.task_finished(taskid) do

stat=gvm.task_get_byid(taskid)
puts "Status: #{stat['status']}, Progress: #{stat['progress']}"
sleep 10

end stat=gvm.task_get_byid(taskid) content=gvm.report_get_byid(stat,‘HTML’) File.open(‘report.html’, ‘w’) {|f| f.write(content) }

Note

Note that if you’re using gem and Ruby 1.8, you should require ‘rubygems’ as well.

Contributing to gvm-gmp

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2010 Vlatko Kosturjak. Copyright © 2022 Konstantin Kraynov See LICENSE.txt for further details.

About

This Ruby gem is used for communication with GVM over GMP. You can start, stop, pause and resume scan. Watch progress and status of scan, download report, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%