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

Fix format string argument mismatches

Cases where the format string does not contain any placeholders, but
values are given anyway. Cases where string.format is used without any
placeholders or arguments.
This commit is contained in:
dmiller
2015-09-18 12:40:32 +00:00
parent a954950b5a
commit 9840973b60
17 changed files with 25 additions and 27 deletions

View File

@@ -948,7 +948,7 @@ local function get_config(host, config)
enabled = false
mod.disabled_message = {}
table.insert(mod.disabled_message, string.format("Configuration error: Required argument(s) ('%s') weren't given.", stdnse.strjoin("', '", missing_args)))
table.insert(mod.disabled_message, string.format("Please add --script-args=[arg]=[value] to your commandline to run this module"))
table.insert(mod.disabled_message, "Please add --script-args=[arg]=[value] to your commandline to run this module")
if(#missing_args == 1) then
table.insert(mod.disabled_message, string.format("For example: --script-args=%s=123", missing_args[1]))
else
@@ -1188,7 +1188,7 @@ local function create_service(host, config)
cleanup(host, config)
if(string.find(err, "MARKED_FOR_DELETE")) then
return false, string.format("Service is stuck in 'being deleted' phase on remote machine; try setting script-args=randomseed=abc for now", err)
return false, "Service is stuck in 'being deleted' phase on remote machine; try setting script-args=randomseed=abc for now"
else
return false, string.format("Couldn't create the service on the remote machine: %s", err)
end
@@ -1278,7 +1278,7 @@ local function get_output_file(host, config)
stdnse.debug1("Error in remote service: output file was never created!")
cleanup(host, config)
return false, string.format("Error in remote service: output file was never created")
return false, "Error in remote service: output file was never created"
end
stdnse.debug1("Output file %s doesn't exist yet, waiting for %d more seconds", config.output_file, i)