Closed santsys closed 7 years ago
The Nexpose API requires a scan template ID to be specified in a SiteConfigSaveRequest so we should update the code here to default to full-audit-without-webspider
to match what the Ruby gem does.
The templateId is set in the AsXML call, however it's after the XML is built (or so it appears).
https://github.com/rapid7/nexpose-client-python/blob/master/nexpose/nexpose_site.py#L129
Ah, yep I noticed this the other day when first looking into it.
@gschneider-r7 Is there any timeline for releasing bug fixes? Thanks!
@gschneider-r7 , I've made a PR that addresses this.
Fix has been merged and a new version, 0.1.1, will be released shortly.
Side note: please use Range(from, to)
for IP addresses, even single addresses, instead of Host
.
e.g.
site_cfg.hosts.append(Range("192.168.0.100", None))
I should be able to release the new version tomorrow as I've run into issues with the pypi service today.
Version 0.1.1 is now published on pypi (for pip install
) and the packages are also available on the github release page: https://github.com/rapid7/nexpose-client-python/releases/tag/0.1.1
Expected Behavior
A new site would be created.
Current Behavior
An error of "NexposeFailureException: templateID must be specified."
Steps to Reproduce (for bugs)
Attempt to create a new site using "SaveSiteConfiguration".
Python code that reproduces the issue:
Context
Attempting to dynamically add hosts to a sites that can then be scanned.
Your Environment