If a message is clearly a warning, then use print_warning

unstable
sinn3r 2012-10-24 00:44:53 -05:00
parent 04fd322c99
commit f1423bf0b4
17 changed files with 32 additions and 32 deletions

View File

@ -135,8 +135,8 @@ class Metasploit3 < Msf::Auxiliary
sunrpc_destroy
rescue ::Rex::Proto::SunRPC::RPCTimeout
print_status 'Warning: ' + $!
print_status 'Exploit may or may not have succeeded.'
print_warning 'Warning: ' + $!
print_warning 'Exploit may or may not have succeeded.'
end

View File

@ -144,7 +144,7 @@ class Metasploit3 < Msf::Auxiliary
end
if(reps < 30)
print_status("WARNING: This server did not reply to all of our requests")
print_warning("WARNING: This server did not reply to all of our requests")
end
if(random)

View File

@ -134,7 +134,7 @@ class Metasploit3 < Msf::Auxiliary
end
if(reps < 30)
print_status("WARNING: This server did not reply to all of our requests")
print_warning("WARNING: This server did not reply to all of our requests")
end
if(random)

View File

@ -222,10 +222,10 @@ EOT
print_status("Undeploying #{uri} by deleting the WAR file via BSHDeployer...")
res = invoke_bshscript(delete_script, @pkg)
if !res
print_error("WARNING: Unable to remove WAR [No Response]")
print_warning("WARNING: Unable to remove WAR [No Response]")
end
if (res.code < 200 || res.code >= 300)
print_error("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
print_warning("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
end
handler
@ -307,7 +307,7 @@ EOT
if (res.code < 200 || res.code >= 300)
case res.code
when 401
print_error("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
fail_with(Exploit::Failure::NoAccess, "Authentication requested: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
end

View File

@ -248,9 +248,9 @@ EOT
delete_res << delete_file('./', Rex::Text.uri_encode(app_base) + '.war', '')
delete_res.each do |res|
if !res
print_error("WARNING: Unable to remove WAR [No Response]")
print_warning("WARNING: Unable to remove WAR [No Response]")
elsif (res.code < 200 || res.code >= 300)
print_error("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
print_warning("WARNING: Unable to remove WAR [#{res.code} #{res.message}]")
end
end

View File

@ -211,7 +211,7 @@ class Metasploit3 < Msf::Exploit::Remote
if (res.code < 200 or res.code >= 300)
case res.code
when 401
print_error("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
end
fail_with(Exploit::Failure::Unknown, "Upload to deploy WAR archive [#{res.code} #{res.message}]")
end
@ -291,12 +291,12 @@ class Metasploit3 < Msf::Exploit::Remote
}
}, 30)
if (! res)
print_error("WARNING: Undeployment failed on #{app_base} [No Response]")
print_warning("WARNING: Undeployment failed on #{app_base} [No Response]")
elsif (res.code == 500 and datastore['VERB'] == 'POST')
# POST requests result in a http 500 error, but the payload is removed..."
print_status("WARNING: Undeployment might have failed (unlikely)")
print_warning("WARNING: Undeployment might have failed (unlikely)")
elsif (res.code < 200 or res.code >= 300)
print_error("WARNING: Undeployment failed on #{app_base} [#{res.code} #{res.message}]")
print_warning("WARNING: Undeployment failed on #{app_base} [#{res.code} #{res.message}]")
end
handler

View File

@ -195,7 +195,7 @@ class Metasploit3 < Msf::Exploit::Remote
})
print_error("Warning: got no response from the upload, continuing...") if !res
print_warning("Warning: got no response from the upload, continuing...") if !res
# Delete the uploaded JAR file
if datastore['REMOVE_PLUGIN']

View File

@ -217,7 +217,7 @@ class Metasploit3 < Msf::Exploit::Remote
if (res.code < 200 or res.code >= 300)
case res.code
when 401
print_error("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
end
fail_with(Exploit::Failure::Unknown, "Upload failed on #{path_tmp} [#{res.code} #{res.message}]")
end
@ -259,9 +259,9 @@ class Metasploit3 < Msf::Exploit::Remote
'method' => 'GET'
}, 20)
if (! res)
print_error("WARNING: Undeployment failed on #{path} [No Response]")
print_warning("WARNING: Undeployment failed on #{path} [No Response]")
elsif (res.code < 200 or res.code >= 300)
print_error("Deletion failed on #{path} [#{res.code} #{res.message}]")
print_warning("Deletion failed on #{path} [#{res.code} #{res.message}]")
end
handler

View File

@ -85,7 +85,7 @@ class Metasploit3 < Msf::Exploit::Remote
print_status('No Errors, appears to have succeeded!')
rescue ::Rex::Proto::SunRPC::RPCTimeout
print_error('Warning: ' + $!)
print_warning('Warning: ' + $!)
end
end

View File

@ -157,9 +157,9 @@ class Metasploit3 < Msf::Exploit::Remote
# Delete the banner :)
if (not openx_banner_delete(uri_base, cookie, adv_id, camp_id, ban_id))
print_error("WARNING: Unable to automatically delete the banner :-/")
print_warning("WARNING: Unable to automatically delete the banner :-/")
else
print_status("Successfully deleted banner # #{ban_id}")
print_good("Successfully deleted banner # #{ban_id}")
end
print_status("You should have a session now.")

View File

@ -74,7 +74,7 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => test_url
}, 25)
if (not res) or (res.code != 404)
print_error("WARNING: The test file exists already!")
print_warning("WARNING: The test file exists already!")
return Exploit::CheckCode::Safe
end
@ -103,7 +103,7 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => cmd_base + Rex::Text.uri_encode(rev)
}, 25)
if (not res) or (res.code != 200)
print_error("WARNING: unable to remove test file (#{test_file})")
print_warning("WARNING: unable to remove test file (#{test_file})")
end
return Exploit::CheckCode::Vulnerable

View File

@ -69,7 +69,7 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => test_url
}, 25)
if (not res) or (res.body.match(content))
print_error("WARNING: The test file exists already!")
print_warning("WARNING: The test file exists already!")
return Exploit::CheckCode::Safe
end
@ -98,7 +98,7 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => cmd_base + Rex::Text.uri_encode(search)
}, 25)
if (not res) or (res.code != 200)
print_error("WARNING: unable to remove test file (#{test_file})")
print_warning("WARNING: unable to remove test file (#{test_file})")
end
return Exploit::CheckCode::Vulnerable

View File

@ -154,7 +154,7 @@ class Metasploit3 < Msf::Exploit::Remote
lines = []
launch_message.gsub(/.{1,80}(?:\s|\Z)/) { lines << $& }
if (lines.length > 2)
print_status("Warning: the LAUNCH_MESSAGE is more than 2 lines. It may not display correctly.")
print_warning("Warning: the LAUNCH_MESSAGE is more than 2 lines. It may not display correctly.")
end
output << "&"+

View File

@ -76,7 +76,7 @@ class Metasploit3 < Msf::Exploit::Remote
print_error("Upload failed on #{path_tmp} [#{res.code} #{res.message}]")
case res.code
when 401
print_status("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
end
return
end
@ -101,9 +101,9 @@ class Metasploit3 < Msf::Exploit::Remote
print_error("Move failed on #{path_tmp} [#{res.code} #{res.message}]")
case res.code
when 401
print_status("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
print_warning("Warning: The web site asked for authentication: #{res.headers['WWW-Authenticate'] || res.headers['Authentication']}")
when 403
print_status("Warning: The web site may not allow 'Script Source Access', which is required to upload executable content.")
print_warning("Warning: The web site may not allow 'Script Source Access', which is required to upload executable content.")
end
return
end

View File

@ -120,8 +120,8 @@ class Metasploit3 < Msf::Exploit::Local
service_delete(name, server)
rescue
print_error("Exception running payload: #{$!.class} : #{$!}")
print_error("#{server.ljust(16)} WARNING: May have failed to clean up!")
print_error("#{server.ljust(16)} Try a command like: sc \\\\#{server}\\ delete #{name}")
print_warning("#{server.ljust(16)} WARNING: May have failed to clean up!")
print_warning("#{server.ljust(16)} Try a command like: sc \\\\#{server}\\ delete #{name}")
next
end
end

View File

@ -148,7 +148,7 @@ class Metasploit3 < Msf::Exploit::Remote
resp = sock.get_once
if (resp and resp !~ /^220/)
print_status("Warning: this server may not support STARTTLS")
print_warning("Warning: this server may not support STARTTLS")
end
end

View File

@ -101,7 +101,7 @@ class Metasploit3 < Msf::Exploit::Remote
# this system, or something major happened to the heap that will probably
# prevent this exploit from working.
if (not ret[3])
print_status("Warning: the leaked heap address indicates that this attack may fail");
print_warning("Warning: the leaked heap address indicates that this attack may fail");
end
# The base address of our structure in memory