When we are in a meterpreter prompt and type exit,
there should be a confirmation to close the meterpreter session.
It happened to me, that instead to background I typed exit, and the session died. Had to exploit the machine again to gain access.
I was under the impression everyone hated the "Do you really want to do the thing you just asked to do" questions?
I was under the impression everyone hated the "Do you really want to do the thing you just asked to do" questions?
Please also implement confirmation on the CTRL+C exit confirmation. I do not want Metasploit to do what I tell it.
^C
Are you sure wish to close this session (y/N) ?
y
Are you really sure (y/N) ?
y
I'd prob go with a captcha or other random math problem to solve 馃槈
I'd prob go with a captcha or other random math problem to solve wink
That seems a bit much, but I do like the idea of randomness.
def handle_input
# ...
q = [
'Are you sure? (Y/n)',
'Super duper sure? (Y/n)',
"Don't lie to me - is what you really want? (N/y)",
'Does this action spark joy? (Y/n)',
"Are you sure not to not exit? (N/y)",
'For guts and glory press N. For work and worry press Y.'
]
rescue => Interrupt
if prompt(q.sample).downcase == 'Y'
`reboot`
end
end
Edit: It appears I'm outvoted in favor of a random math puzzle or CAPTCHA. Perhaps the best of both worlds: at random, drop the session shell into a hacking mini-game, and the session dies upon failure.
Seconding CAPTCHA!
OK, in seriousness, I would not be opposed to adding a -i option to exit so it checks, but I think we'd break lots of workflows and scripts changing the behavior of exit. I am going to close this, though.
Most helpful comment
I'd prob go with a captcha or other random math problem to solve 馃槈