-- An attempt at writing the exploit.lua library mentioned here -- https://github.com/nmap/nmap/issues/186. Let's see how far i get. local stdnse = require 'stdnse' local string = require 'string' local table = require 'table' local vulns = require 'vulns' LIBRARY_NAME = "exploit" _ENV = stdnse.module("exploit", stdnse.seeall) DEFAULT_ARGS = {} function get_specific_argument(script_name, arg) if stdnse.get_script_args(script_name .. "." .. arg) return stdnse.get_script_args(script_name .. "." .. arg) elseif stdnse.get_script_args(LIBRARY_NAME .. "." .. arg) return stdnse.get_script_args(LIBRARY_NAME .. "." .. arg) else return DEFAULT_ARGS[arg] or nil end end -- could probably lift few of these from the various -- vuln scripts we already have. function send_request(architecture, command) end function parse_response(architecture, command) end return _ENV;