Skip to content

Commit 592f1e9

Browse files
author
Tod Beardsley
committed
Land rapid7#3999, errors on login suppressed by default
This also solved the merge conflict on: modules/auxiliary/scanner/http/jenkins_login.rb Fixes rapid7#3995.
2 parents fdd79e6 + 9500038 commit 592f1e9

23 files changed

+80
-36
lines changed

modules/auxiliary/scanner/afp/afp_login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def run_host(ip)
7979
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
8080
else
8181
invalidate_login(credential_data)
82-
print_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
82+
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
8383
end
8484
end
8585
end

modules/auxiliary/scanner/db2/db2_auth.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def run_host(ip)
7777
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
7878
else
7979
invalidate_login(credential_data)
80-
print_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
80+
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
8181
end
8282
end
8383
end

modules/auxiliary/scanner/ftp/ftp_login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def run_host(ip)
9191
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
9292
else
9393
invalidate_login(credential_data)
94-
print_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
94+
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
9595
end
9696
end
9797

modules/auxiliary/scanner/http/axis_login.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,15 @@ def run_host(ip)
101101
create_credential_login(credential_data)
102102
:next_user
103103
when Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
104-
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
104+
if datastore['VERBOSE']
105+
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
106+
end
105107
invalidate_login(credential_data)
106108
:abort
107109
when Metasploit::Model::Login::Status::INCORRECT
108-
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
110+
if datastore['VERBOSE']
111+
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
112+
end
109113
invalidate_login(credential_data)
110114
end
111115
end

modules/auxiliary/scanner/http/glassfish_login.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ def bruteforce(ip)
147147
do_report(ip, rport, result)
148148
:next_user
149149
when Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
150-
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
150+
if datastore['VERBOSE']
151+
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
152+
end
151153
invalidate_login(
152154
address: ip,
153155
port: rport,
@@ -160,7 +162,9 @@ def bruteforce(ip)
160162
)
161163
:abort
162164
when Metasploit::Model::Login::Status::INCORRECT
163-
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
165+
if datastore['VERBOSE']
166+
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
167+
end
164168
invalidate_login(
165169
address: ip,
166170
port: rport,

modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ def bruteforce(ip)
125125
do_report(ip, rport, result)
126126
:next_user
127127
when Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
128-
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
128+
if datastore['VERBOSE']
129+
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
130+
end
129131
invalidate_login(
130132
address: ip,
131133
port: rport,
@@ -138,7 +140,9 @@ def bruteforce(ip)
138140
)
139141
:abort
140142
when Metasploit::Model::Login::Status::INCORRECT
141-
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
143+
if datastore['VERBOSE']
144+
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
145+
end
142146
invalidate_login(
143147
address: ip,
144148
port: rport,

modules/auxiliary/scanner/http/http_login.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,15 @@ def run_host(ip)
164164
create_credential_login(credential_data)
165165
:next_user
166166
when Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
167-
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
167+
if datastore['VERBOSE']
168+
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
169+
end
168170
invalidate_login(credential_data)
169171
:abort
170172
when Metasploit::Model::Login::Status::INCORRECT
171-
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
173+
if datastore['VERBOSE']
174+
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
175+
end
172176
invalidate_login(credential_data)
173177
end
174178
end

modules/auxiliary/scanner/http/ipboard_login.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ def run_host(ip)
6363
create_credential_login(credential_data)
6464
:next_user
6565
when Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
66-
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
66+
if datastore['VERBOSE']
67+
print_brute :level => :verror, :ip => ip, :msg => "Could not connect"
68+
end
6769
invalidate_login(credential_data)
6870
:abort
6971
when Metasploit::Model::Login::Status::INCORRECT
70-
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
72+
if datastore['VERBOSE']
73+
print_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
74+
end
7175
invalidate_login(credential_data)
7276
end
7377
end

modules/auxiliary/scanner/http/jenkins_login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run_host(ip)
6767
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
6868
else
6969
invalidate_login(credential_data)
70-
vprint_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status})"
70+
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status})"
7171
end
7272
end
7373
end

modules/auxiliary/scanner/http/tomcat_mgr_login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def run_host(ip)
130130
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential}"
131131
else
132132
invalidate_login(credential_data)
133-
print_status "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
133+
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
134134
end
135135
end
136136
end

0 commit comments

Comments
 (0)