Skip to content

Commit f1423bf

Browse files
committed
If a message is clearly a warning, then use print_warning
1 parent 04fd322 commit f1423bf

17 files changed

+32
-32
lines changed

modules/auxiliary/admin/sunrpc/solaris_kcms_readfile.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ def run
135135
sunrpc_destroy
136136

137137
rescue ::Rex::Proto::SunRPC::RPCTimeout
138-
print_status 'Warning: ' + $!
139-
print_status 'Exploit may or may not have succeeded.'
138+
print_warning 'Warning: ' + $!
139+
print_warning 'Exploit may or may not have succeeded.'
140140
end
141141

142142

modules/auxiliary/spoof/dns/bailiwicked_domain.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def cmd_check(*args)
144144
end
145145

146146
if(reps < 30)
147-
print_status("WARNING: This server did not reply to all of our requests")
147+
print_warning("WARNING: This server did not reply to all of our requests")
148148
end
149149

150150
if(random)

modules/auxiliary/spoof/dns/bailiwicked_host.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def cmd_check(*args)
134134
end
135135

136136
if(reps < 30)
137-
print_status("WARNING: This server did not reply to all of our requests")
137+
print_warning("WARNING: This server did not reply to all of our requests")
138138
end
139139

140140
if(random)

modules/exploits/multi/http/jboss_bshdeployer.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ def exploit
222222
print_status("Undeploying #{uri} by deleting the WAR file via BSHDeployer...")
223223
res = invoke_bshscript(delete_script, @pkg)
224224
if !res
225-
print_error("WARNING: Unable to remove WAR [No Response]")
225+
print_warning("WARNING: Unable to remove WAR [No Response]")
226226
end
227227
if (res.code < 200 || res.code >= 300)
228-
print_error("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
228+
print_warning("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
229229
end
230230

231231
handler
@@ -307,7 +307,7 @@ def deploy_bsh(bsh_script)
307307
if (res.code < 200 || res.code >= 300)
308308
case res.code
309309
when 401
310-
print_error("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
310+
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
311311
fail_with(Exploit::Failure::NoAccess, "Authentication requested: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
312312
end
313313

modules/exploits/multi/http/jboss_deploymentfilerepository.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ def exploit
248248
delete_res << delete_file('./', Rex::Text.uri_encode(app_base) + '.war', '')
249249
delete_res.each do |res|
250250
if !res
251-
print_error("WARNING: Unable to remove WAR [No Response]")
251+
print_warning("WARNING: Unable to remove WAR [No Response]")
252252
elsif (res.code < 200 || res.code >= 300)
253-
print_error("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
253+
print_warning("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
254254
end
255255
end
256256

modules/exploits/multi/http/jboss_maindeployer.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def exploit
211211
if (res.code < 200 or res.code >= 300)
212212
case res.code
213213
when 401
214-
print_error("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
214+
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
215215
end
216216
fail_with(Exploit::Failure::Unknown, "Upload to deploy WAR archive [#{res.code} #{res.message}]")
217217
end
@@ -291,12 +291,12 @@ def exploit
291291
}
292292
}, 30)
293293
if (! res)
294-
print_error("WARNING: Undeployment failed on #{app_base} [No Response]")
294+
print_warning("WARNING: Undeployment failed on #{app_base} [No Response]")
295295
elsif (res.code == 500 and datastore['VERB'] == 'POST')
296296
# POST requests result in a http 500 error, but the payload is removed..."
297-
print_status("WARNING: Undeployment might have failed (unlikely)")
297+
print_warning("WARNING: Undeployment might have failed (unlikely)")
298298
elsif (res.code < 200 or res.code >= 300)
299-
print_error("WARNING: Undeployment failed on #{app_base} [#{res.code} #{res.message}]")
299+
print_warning("WARNING: Undeployment failed on #{app_base} [#{res.code} #{res.message}]")
300300
end
301301

302302
handler

modules/exploits/multi/http/openfire_auth_bypass.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def exploit
195195
})
196196

197197

198-
print_error("Warning: got no response from the upload, continuing...") if !res
198+
print_warning("Warning: got no response from the upload, continuing...") if !res
199199

200200
# Delete the uploaded JAR file
201201
if datastore['REMOVE_PLUGIN']

modules/exploits/multi/http/tomcat_mgr_deploy.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def exploit
217217
if (res.code < 200 or res.code >= 300)
218218
case res.code
219219
when 401
220-
print_error("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
220+
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
221221
end
222222
fail_with(Exploit::Failure::Unknown, "Upload failed on #{path_tmp} [#{res.code} #{res.message}]")
223223
end
@@ -259,9 +259,9 @@ def exploit
259259
'method' => 'GET'
260260
}, 20)
261261
if (! res)
262-
print_error("WARNING: Undeployment failed on #{path} [No Response]")
262+
print_warning("WARNING: Undeployment failed on #{path} [No Response]")
263263
elsif (res.code < 200 or res.code >= 300)
264-
print_error("Deletion failed on #{path} [#{res.code} #{res.message}]")
264+
print_warning("Deletion failed on #{path} [#{res.code} #{res.message}]")
265265
end
266266

267267
handler

modules/exploits/solaris/sunrpc/ypupdated_exec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def exploit
8585

8686
print_status('No Errors, appears to have succeeded!')
8787
rescue ::Rex::Proto::SunRPC::RPCTimeout
88-
print_error('Warning: ' + $!)
88+
print_warning('Warning: ' + $!)
8989
end
9090

9191
end

modules/exploits/unix/webapp/openx_banner_edit.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ def exploit
157157

158158
# Delete the banner :)
159159
if (not openx_banner_delete(uri_base, cookie, adv_id, camp_id, ban_id))
160-
print_error("WARNING: Unable to automatically delete the banner :-/")
160+
print_warning("WARNING: Unable to automatically delete the banner :-/")
161161
else
162-
print_status("Successfully deleted banner # #{ban_id}")
162+
print_good("Successfully deleted banner # #{ban_id}")
163163
end
164164

165165
print_status("You should have a session now.")

0 commit comments

Comments
 (0)