Skip to content

Commit 88f2383

Browse files
committed
Added Time out
For some reason the handler was closing before the command could complete. Added the time out from bypassuac and now both psh and exe work perfectly.
1 parent add5cef commit 88f2383

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/msf/core/post/windows/runas.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ def shell_execute_psh
3030
def shell_exec(command, args)
3131
print_status('Executing Command!')
3232
session.railgun.shell32.ShellExecuteA(nil, 'runas', command, args, nil, 'SW_SHOW')
33+
::Timeout.timeout(30) do
34+
select(nil, nil, nil, 1) until session_created?
35+
end
3336
end
3437
end

0 commit comments

Comments
 (0)