Land #2255 - Fix fail_with()
commit
f148eb4715
|
@ -126,7 +126,7 @@ module Exploit::Remote::HttpClient
|
||||||
opts[:pattern].each do |re|
|
opts[:pattern].each do |re|
|
||||||
if not re.match(info)
|
if not re.match(info)
|
||||||
err = "The target server fingerprint \"#{info}\" does not match \"#{re.to_s}\", use 'set FingerprintCheck false' to disable this check."
|
err = "The target server fingerprint \"#{info}\" does not match \"#{re.to_s}\", use 'set FingerprintCheck false' to disable this check."
|
||||||
fail_with(Msf::Exploit::Failure::NotFound, err)
|
fail_with(Failure::NotFound, err)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -144,7 +144,7 @@ module Exploit::Remote::MSSQL_SQLI
|
||||||
if (datastore['METHOD'] == 'GET')
|
if (datastore['METHOD'] == 'GET')
|
||||||
|
|
||||||
unless datastore['GET_PATH'].index("[SQLi]")
|
unless datastore['GET_PATH'].index("[SQLi]")
|
||||||
fail_with(Exploit::Failure::NoTarget, "The SQL injection parameter was not specified in the GET path")
|
fail_with(Failure::NoTarget, "The SQL injection parameter was not specified in the GET path")
|
||||||
end
|
end
|
||||||
|
|
||||||
uri = datastore['GET_PATH'].gsub("[SQLi]", Rex::Text.uri_encode(sqla))
|
uri = datastore['GET_PATH'].gsub("[SQLi]", Rex::Text.uri_encode(sqla))
|
||||||
|
@ -160,7 +160,7 @@ module Exploit::Remote::MSSQL_SQLI
|
||||||
else
|
else
|
||||||
|
|
||||||
unless datastore['DATA'].index("[SQLi]")
|
unless datastore['DATA'].index("[SQLi]")
|
||||||
fail_with(Exploit::Failure::NoTarget, "The SQL injection parameter was not specified in the POST data")
|
fail_with(Failure::NoTarget, "The SQL injection parameter was not specified in the POST data")
|
||||||
end
|
end
|
||||||
|
|
||||||
post_data = datastore['DATA'].gsub("[SQLi]", Rex::Text.uri_encode(sqla))
|
post_data = datastore['DATA'].gsub("[SQLi]", Rex::Text.uri_encode(sqla))
|
||||||
|
|
Loading…
Reference in New Issue