-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add methods to enable debug/enhanced logging in the scan template. #197
Conversation
logging = REXML::Element.new('Logging') | ||
@xml.add_element(logging) | ||
end | ||
enhancedLogging = REXML::XPath.first(logging, 'enhancedLogging') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use snake_case for variable names.
|
||
# Enable or disable the debug logging. | ||
# @param [Boolean] enable Enable or disable the debug logging. | ||
def enable_debug_logging=(enable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be debug_logging=(enable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are methods with the same prefix serving this purpose in the file. Don't see a big difference to make the change.
$ grep -B2 "def enable_.*=(enable)" lib/nexpose/scan_template.rb
# Enable/disable IP stack fingerprinting
# @param [Boolean] enable Enable or disable IP stack fingerprinting
def enable_ip_stack_fingerprinting=(enable)
--
# Enable/disable ICMP device discovery
# @param [Boolean] enable Enable or disable ICMP device discovery
def enable_icmp_device_discovery=(enable)
--
# Enable/disable TCP device discovery
# @param [Boolean] enable Enable or disable TCP device discovery
def enable_tcp_device_discovery=(enable)
--
# Enable/disable UDP device discovery
# @param [Boolean] enable Enable or disable UDP device discovery
def enable_udp_device_discovery=(enable)
--
# Enable or disable TCP port scanning.
# @param [Boolean] enable Enable or disable TCP ports
def enable_tcp_service_discovery=(enable)
--
# Enable or disable UDP service discovery
# @param [Boolean] enable Enable or disable UDP service discovery
def enable_udp_service_discovery=(enable)
--
# Enable or disable the debug logging.
# @param [Boolean] enable Enable or disable the debug logging.
def enable_debug_logging=(enable)
--
# Enable or disable the enhanced logging.
# @param [Boolean] enable Enable or disable the enhanced logging.
def enable_enhanced_logging=(enable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
I'm surprised you could create a branch here. @gschneider-r7 , I thought he had to fork the repo? Or is it just if you're an external contributor that you need to do that? |
Forks are not required for internal contributors, but may be useful when a branch may have lots of commits or may need to be squashed/rewrite history to keep the main repo "clean". In this case the branch is fine. |
# @param [Boolean] enable Enable or disable the enhanced logging. | ||
def enable_enhanced_logging=(enable) | ||
debug_logging = enable | ||
aces_level = (enable ? 'full' : 'none') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless assignment to variable - aces_level
.
could you please add the ticket number to the commit comment |
Normally, as pulls in https://github.com/rapid7/nexpose-client/pulls, we don't include the internal ticket number I guess since this is a public repo. |
Looks good to me. ლ(́◉◞౪◟◉‵ლ) |
Yeah we don't need (or want) to use internal ticket numbers in this repo. |
# @param [Boolean] enable Enable or disable the enhanced logging. | ||
def enable_enhanced_logging=(enable) | ||
self.enable_debug_logging = enable | ||
self.aces_level = (enable ? 'full' : 'none') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, self.
. I forgot about that.
🚢 once the associated code changes are ready |
Add methods to enable debug/enhanced logging in the scan template.
This feature is dependent on a future version of Nexpose.