Skip to content

Commit 4822aa5

Browse files
committed
Land rapid7#4739, @zeroSteiner's change to prepend_sleep powershell option check
2 parents 81cad06 + 2a3855c commit 4822aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/exploit/powershell.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ def cmd_psh_payload(pay, payload_arch, opts = {})
296296
if opts[:prepend_sleep]
297297
if opts[:prepend_sleep].to_i > 0
298298
psh_payload = "Start-Sleep -s #{opts[:prepend_sleep]};" << psh_payload
299-
else
300-
vprint_error('Sleep time must be greater than 0 seconds')
299+
elsif opts[:prepend_sleep].to_i < 0
300+
vprint_error('Sleep time must be greater than or equal to 0 seconds')
301301
end
302302
end
303303

0 commit comments

Comments
 (0)