Skip to content

Conversation

@Red5d
Copy link
Contributor

@Red5d Red5d commented May 31, 2016

The previous method of parsing the output of the "version engines" console command doesn't always work. The console command sometimes doesn't return data. This AJAX post method is what the web UI uses to get the engine data. It returns an array of engine data hash objects.

The previous method of parsing the output of the "version engines" console command doesn't always work. The console command sometimes doesn't return data. This AJAX post method is what the web UI uses to get the engine data. It returns an array of engine data hash objects.
versions << engdata
end
versions
JSON.parse(AJAX.post(self, "/data/engines"))['records']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@gschneider-r7
Copy link
Contributor

The console command sometimes doesn't return data.

Hmm this seems like a bug to me. Will need to investigate it. cc @btrujillo-r7

@sgreen-r7
Copy link
Contributor

@Red5d if/when you get a chance, can you let us know what kinda setup isn't returning data?

Nexpose version, engine version, and the OS for each?

we're under the impression that a console command should "always" return data.

@Red5d
Copy link
Contributor Author

Red5d commented Jun 6, 2016

@sgreen-r7 Currently on Nexpose 6.2.10. Sometimes when the console is running slowly (while integrating a scan or something), the console command doesn't work. It may be a bug in Nexpose, but using this method through the AJAX api structures the data better and seems to always work from what I've seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants