mirror of
https://github.com/nmap/nmap.git
synced 2026-01-16 19:39:03 +00:00
print host name and IP in a script engine status message, rather than just hostname (which Nmap sometimes does not know). Patch from Jah
This commit is contained in:
@@ -156,12 +156,13 @@ int script_scan(std::vector<Target*> &targets) {
|
||||
|
||||
SCRIPT_ENGINE_DEBUGGING(
|
||||
unsigned int tlen = targets.size();
|
||||
char targetstr[128];
|
||||
if(tlen > 1)
|
||||
log_write(LOG_STDOUT, "%s: Script scanning %d hosts.\n",
|
||||
SCRIPT_ENGINE, tlen);
|
||||
else
|
||||
log_write(LOG_STDOUT, "%s: Script scanning %s.\n",
|
||||
SCRIPT_ENGINE, (*targets.begin())->HostName());
|
||||
SCRIPT_ENGINE, (*targets.begin())->NameIP(targetstr, sizeof(targetstr)));
|
||||
)
|
||||
|
||||
l = lua_open();
|
||||
|
||||
Reference in New Issue
Block a user