mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
Gets arguments with stdnse.get_script_args instead of reading them from nmap.registry
This commit is contained in:
@@ -41,14 +41,14 @@ require 'informix'
|
||||
portrule = shortport.port_or_service( { 1526, 9088, 9090, 9092 }, "informix", "tcp", "open")
|
||||
|
||||
action = function( host, port )
|
||||
local instance = nmap.registry.args['informix-info.instance']
|
||||
local instance = stdnse.get_script_args('informix-info.instance')
|
||||
local helper
|
||||
local status, data
|
||||
local result = {}
|
||||
local user = nmap.registry.args['informix-query.username']
|
||||
local pass = nmap.registry.args['informix-query.password']
|
||||
local query = nmap.registry.args['informix-query.query']
|
||||
local db = nmap.registry.args['informix-query.database'] or "sysmaster"
|
||||
local user = stdnse.get_script_args('informix-query.username')
|
||||
local pass = stdnse.get_script_args('informix-query.password')
|
||||
local query = stdnse.get_script_args('informix-query.query')
|
||||
local db = stdnse.get_script_args('informix-query.database') or "sysmaster"
|
||||
|
||||
query = query or "SELECT FIRST 1 DBINFO('dbhostname') hostname, " ..
|
||||
"DBINFO('version','full') version FROM systables"
|
||||
@@ -86,4 +86,4 @@ action = function( host, port )
|
||||
|
||||
|
||||
return stdnse.format_output(status, result)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user