mirror of
https://github.com/nmap/nmap.git
synced 2026-09-05 09:59:40 +00:00
Quote args with spaces in invocation summary
This commit is contained in:
parent
4519e7f899
commit
7acdd4b41f
1 changed files with 1 additions and 10 deletions
11
nmap.cc
11
nmap.cc
|
|
@ -1896,17 +1896,8 @@ int nmap_main(int argc, char *argv[]) {
|
|||
xml_start_tag("nmaprun", false);
|
||||
}
|
||||
|
||||
std::string command;
|
||||
if (argc > 0)
|
||||
command += argv[0];
|
||||
for (i = 1; i < argc; i++) {
|
||||
command += " ";
|
||||
command += argv[i];
|
||||
}
|
||||
|
||||
log_write(LOG_NORMAL | LOG_MACHINE, "# ");
|
||||
log_write(LOG_NORMAL | LOG_MACHINE, "%s %s scan initiated %s as: ", NMAP_NAME, NMAP_VERSION, mytime);
|
||||
log_write(LOG_NORMAL | LOG_MACHINE, "%s", command.c_str());
|
||||
log_write(LOG_NORMAL | LOG_MACHINE, "%s %s scan initiated %s as: %s", NMAP_NAME, NMAP_VERSION, mytime, join_quoted(argv, argc).c_str());
|
||||
log_write(LOG_NORMAL | LOG_MACHINE, "\n");
|
||||
|
||||
/* Before we randomize the ports scanned, lets output them to machine
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue