1
0
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:
fyodor
2008-04-05 23:52:41 +00:00
parent 83fe88c0f8
commit d3d97d934b

View File

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