Closed OJ closed 9 years ago
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/201/ Test PASSED.
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/202/ Test PASSED.
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/203/ Test PASSED.
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/204/ Test PASSED.
Works for me, thanks.
Thank you sir!
There were valid concerns that the use of
Sleep()
on Windows wasn't going to provide enough time given that the limit of using aDWORD
for timeouts that are specified in milliseconds result in a limitation of approximately 49 days (thanks @bcook-r7 for pointing that out).This PR uses the hidden
NtDelayExecution
function that is inntdll.dll
instead ofSleep
where possible and falls back onSleep
if not found. This function can sleep for way longer (see code comments).Verification
sleep
command still works as it does before.sleep
command with a value > 50 days and < 22,000 years (such as4752000
seconds) "works" (I pity the tester). Make sure that the session expiry time is updated so that when the sleep returns it doesn't just show down immediately.