mirror of
https://github.com/nmap/nmap.git
synced 2026-01-21 05:39:14 +00:00
NSE run-time interaction support
This commit is contained in:
10
nse_main.cc
10
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);
|
||||
|
||||
Reference in New Issue
Block a user