diff --git a/nse_main.cc b/nse_main.cc index ff2d0332e..41930f1b7 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -20,6 +20,7 @@ extern "C" { #include "NmapOps.h" #include "timing.h" #include "Target.h" +#include "nmap_tty.h" extern NmapOps o; @@ -257,6 +258,15 @@ int process_mainloop(lua_State* l) { unfinished = running_scripts.size() + waiting_scripts.size(); + if (keyWasPressed()) { + done = 1.0 - (((double) unfinished) / total); + if (o.verbose > 1 || o.debugging) { + log_write(LOG_STDOUT, "Active NSE scripts: %d\n", unfinished); + log_flush(LOG_STDOUT); + } + progress.printStats(done, NULL); + } + SCRIPT_ENGINE_VERBOSE( if(progress.mayBePrinted(NULL)) { done = 1.0 - (((double) unfinished) / total);