-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Improve AutoCheck user experience (prints, etc.) #15399
Conversation
end | ||
|
||
def initialize(info = {}) | ||
super | ||
|
||
register_advanced_options([ | ||
OptBool.new('AutoCheck', [false, 'Run check before exploitation', true]), | ||
OptBool.new('AutoCheck', [false, 'Run check before exploit', true]), |
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 sounds grammatically more natural in the context of an exploit.
@@ -36,10 +36,10 @@ def with_prepended_auto_check | |||
return yield | |||
end | |||
|
|||
print_status('Executing automatic check (disable AutoCheck to override)') | |||
print_status('Running automatic check ("set AutoCheck false" to disable)') |
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 is more consistent with the option description and behavior (and avoids semantic satiation). Also adds a handy example.
|
||
warning_msg = 'ForceExploit is enabled, proceeding with exploitation.' | ||
error_msg = 'Enable ForceExploit to override check result.' | ||
error_msg = '"set ForceExploit true" to override check result.' |
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.
Handy example++.
@@ -54,8 +54,7 @@ def with_prepended_auto_check | |||
return yield | |||
end | |||
|
|||
fail_with(Module::Failure::NotVulnerable, | |||
"#{checkcode.message} #{error_msg}") | |||
fail_with(Module::Failure::NotVulnerable, "#{checkcode.message} #{error_msg}") |
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.
80 columns be damned.
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.
Words are hard. If I break
master
, I'll fix it. (:Fixes #12853. For #15398.