DanMcInerney / pymetasploit3

Automation library for Metasploit
MIT License
366 stars 93 forks source link

Stop hanging command execution in console #80

Open 0xless opened 2 years ago

0xless commented 2 years ago

I'm trying to automate the attack to a whole network and I'm using client.consoles.console(cid).write(command) to execute commands in a metasploit console.

I found that an exploit I'm using sometimes hangs and blocks the execution of the whole process. What I need to do is to stop the execution of this command (without destroying the console).

I couldn't find a way to do this using the library. It would be a cool feature to have.

I thought about sending a SIGINT signal to take care of that but I struggle to figure out the process to which send the signal.