Skip to content

Commit

Permalink
Merge pull request #207 from rapid7/enable_windows_services
Browse files Browse the repository at this point in the history
Windows services editor option
  • Loading branch information
sgreen-r7 committed Jan 20, 2016
2 parents 90f9412 + 2680c8b commit c978af0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/nexpose/scan_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -583,5 +583,21 @@ def enable_enhanced_logging=(enable)
self.enable_debug_logging = enable
self.aces_level = (enable ? 'full' : 'none')
end

# Enable or disable windows service editor.
# @param [Boolean] enable Enable or disable windows service editor.
def windows_service_editor=(enable)
cifs_scanner = REXML::XPath.first(@xml, 'ScanTemplate/Plugins/Plugin[@name="java/CifsScanner"]')
param = REXML::XPath.first(cifs_scanner, './param[@name="windowsServiceEditor"]')
if param
param.text = (enable ? '1' : '0')
else
param = REXML::Element.new('param')
param.attributes['name'] = 'windowsServiceEditor'
param.text = (enable ? '1' : '0')
cifs_scanner.add_element(param)
end
param.text
end
end
end

0 comments on commit c978af0

Please sign in to comment.