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

Problem with Scan Import/Export on Windows #120

Closed
mdaines-r7 opened this issue Feb 13, 2015 · 2 comments
Closed

Problem with Scan Import/Export on Windows #120

mdaines-r7 opened this issue Feb 13, 2015 · 2 comments
Assignees
Labels

Comments

@mdaines-r7
Copy link
Contributor

Sorry, I haven't had time to confirm this on a Windows VM, but I've seen two different people with the same issue when running the script posted to community for exporting and importing scans:

https://community.rapid7.com/community/nexpose/blog/2014/10/01/scan-exportimport-using-the-nexpose-client-gem

It is suggested that the script was working correctly with 0.8.15 of the gem, so potentially a change introduced in 0.9.x?

windows-fail

The export works fine, however, during an import into a new silo, I get the following:

/Library/Ruby/Gems/2.0.0/gems/nexpose-0.9.3/lib/nexpose/api_request.rb:139:in `execute': NexposeAPI: Action failed: org.xml.sax.SAXException (Nexpose::APIError)
java.lang.NullPointerException
from /Library/Ruby/Gems/2.0.0/gems/nexpose-0.9.3/lib/nexpose/connection.rb:88:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/nexpose-0.9.3/lib/nexpose/site.rb:305:in `save'
from new1.rb:16:in `<main>’

Same script works on Linux.

One issue may be with the site and the credentials when copying causing the later problem.

@gschneider-r7 gschneider-r7 self-assigned this Mar 3, 2015
@gschneider-r7
Copy link
Contributor

From some quick testing, the first issue seems to only be an issue with 64-bit Ruby 2.0.0 on Windows.

  • Ruby 2.0.0 64-bit: Fail ❌
  • Ruby 2.0.0 32-bit: Success ✅
  • Ruby 2.1.5 64-bit: Success ✅

Interestingly, after going from 2.1.5 64-bit back to 2.0.0 64-bit (each version was uninstalled before I installed another) it seems to work okay. The only thing I noticed different was that Rex was not downloaded the second time around on 2.0.0, but the Nexpose gem was. Perhaps it cached the previous install or used the one from 2.1.5. If the only change to the Nexpose gem was using Rex instead of rest client it could be an issue with Rex on 2.0.0 64-bit (Windows).

Anyway, since we are likely going to require Ruby 2.1 as a minimum not far from now, this may not be worth investigating further.

@gschneider-r7
Copy link
Contributor

Closing this since it hasn't been reliably reproduced in a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants