Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a different method for getting engine versions #231

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions lib/nexpose/manage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,10 @@ def system_information
end

# Obtain the version information for each scan engine.
# Includes Product, Content, and Java versions.
# Includes dates and ids for Product and Content versions.
#
def engine_versions
info = console_command('version engines')
versions = []
engines = info.sub('VERSION INFORMATION\n', '').split(/\n\n/)
engines.each do |eng|
engdata = {}
eng.split(/\n/).each do |kv|
key, value = kv.split(/:\s*/)
key = key.sub('Local Engine ', '').sub('Remote Engine ', '')
engdata[key] = value
end
versions << engdata
end
versions
JSON.parse(AJAX.post(self, '/data/engines'))['records']
end

# Induce the application to retrieve required updates and restart
Expand Down