1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 18:39:03 +00:00

merge soc07 r4799 - NSE formatScriptOutput() function uses strtok which has side effects on its argument.

This commit is contained in:
fyodor
2007-08-11 03:30:38 +00:00
parent c7e8e225a9
commit 3f2f00900a

View File

@@ -680,12 +680,12 @@ void printportoutput(Target *currenths, PortList *plist) {
for( ssr_iter = current->scriptResults.begin();
ssr_iter != current->scriptResults.end();
ssr_iter++) {
char* script_output = formatScriptOutput((*ssr_iter));
Tbl->addItem(rowno, 0, true, true, script_output);
free(script_output);
log_write(LOG_XML, "<script id=\"%s\" output=\"%s\" />",
(*ssr_iter).id, (*ssr_iter).output);
char* script_output = formatScriptOutput((*ssr_iter));
Tbl->addItem(rowno, 0, true, true, script_output);
free(script_output);
rowno++;
}
@@ -1701,10 +1701,10 @@ void printhostscriptresults(Target *currenths) {
log_write(LOG_XML, "<hostscript>");
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "\nHost script results:\n");
for(iter = currenths->scriptResults.begin(); iter != currenths->scriptResults.end(); iter++) {
script_output = formatScriptOutput((*iter));
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "%s\n", script_output);
log_write(LOG_XML, "<script id=\"%s\" output=\"%s\" />",
(*iter).id, (*iter).output);
script_output = formatScriptOutput((*iter));
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT, "%s\n", script_output);
}
log_write(LOG_XML, "</hostscript>");
}