Add global datastore option configuration#21148
Open
adfoster-r7 wants to merge 1 commit intorapid7:masterfrom
Open
Add global datastore option configuration#21148adfoster-r7 wants to merge 1 commit intorapid7:masterfrom
adfoster-r7 wants to merge 1 commit intorapid7:masterfrom
Conversation
adfoster-r7
commented
Mar 19, 2026
| end | ||
| else | ||
| other.each do |k, v| | ||
| self.store(k, v) |
Contributor
Author
There was a problem hiding this comment.
This was bypassing the normalization logic by directly storing the value under the given key
99873f3 to
411a483
Compare
411a483 to
f9976dd
Compare
Contributor
|
Got some unexpected results when testing this. I could be doing something wrong here, so I'll add the steps I took to test this below. I added some diff --git a/modules/auxiliary/scanner/postgres/postgres_login.rb b/modules/auxiliary/scanner/postgres/postgres_login.rb
index c654cf4e748..a92037f9b46 100644
--- a/modules/auxiliary/scanner/postgres/postgres_login.rb
+++ b/modules/auxiliary/scanner/postgres/postgres_login.rb
@@ -98,6 +98,8 @@ class MetasploitModule < Msf::Auxiliary
# Loops through each host in turn. Note the current IP address is both
# ip and datastore['RHOST']
def run_host(ip)
+ puts "verbose=#{datastore['VERBOSE'].inspect} #{datastore['VERBOSE'].class} - #{framework.datastore['VERBOSE'].inspect} #{framework.datastore['VERBOSE'].class}"
+ vprint_status("Starting scan (VERBOSE TESTING)")
cred_collection = build_credential_collection(
realm: datastore['DATABASE'],
username: datastore['USERNAME'],
@@ -154,6 +156,7 @@ class MetasploitModule < Msf::Auxiliary
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
end
end
+ vprint_status("Finished scan (VERBOSE TESTING)")
{ successful_logins: successful_logins, successful_sessions: successful_sessions }
endI added the module options below with the output. I set verbose to false, then ran the module but still got verbose output. I also added the logging you called out and it returns that verbose was set to true. Console output: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug when setting
verboselogging as false globally would still cause verbose logging to occurFixes #21099
Verification
set VERBOSEfailing/not working as expected (always giving output) #21099For ease of debugging I also added: