Skip to content

Commit 2a3855c

Browse files
committed
Skip the psh prepend sleep time error when it is 0
1 parent 133ae4c commit 2a3855c

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)