I am currently working on a post modules which needs to set up a simple http server. i did this with include Msf::Exploit::Remote::HttpServer and the def on_request_uri() method but unfortunatly because of that the module starts as a job and does not exit after the post module should be done and a new session is created.
Because of the usage of Msf::Exploit::Remote::HttpServer, i have written the code id ussualy write in the exploit() method in the primer() method maybe that is a problem but i dont know another way to do it
So is there a way to make the module stop itself when a new session was created for example? (i tryed "exit" but because of that the module throws an error) or is there another better way to create a simple http server?
Thanks in advance