1
0
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:
doug
2007-12-30 03:26:43 +00:00
parent 4a2ca9b350
commit da39aace20

View File

@@ -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);