PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` local ajp = require "ajp" local shortport = require "shortport" local stdnse = require "stdnse" description = [[ Performs a HEAD or GET request against either the root directory or any optional directory of an Apache JServ Protocol server and returns the server response headers. ]] --- -- @usage -- nmap -p 8009 --script ajp-headers -- -- @output -- PORT STATE SERVICE -- 8009/tcp open ajp13 -- | ajp-headers: -- | X-Powered-By: JSP/2.2 -- | Set-Cookie: JSESSIONID=goTHax+8ktEcZsBldANHBAuf.undefined; Path=/helloworld -- | Content-Type: text/html;charset=ISO-8859-1 -- |_ Content-Length: 149 -- -- @args ajp-headers.path The path to request, such as /index.php. Default /. portrule = shortport.port_or_service(8009, 'ajp13', 'tcp') author = "Patrik Karlsson" license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"discovery", "safe"} local arg_path = stdnse.get_script_args(SCRIPT_NAME .. '.path') or "/" local function fail(err) return ("\n ERROR: %s"):format(err or "") end action = function(host, port) local method local helper = ajp.Helper:new(host, port) helper:connect() local status, response = helper:get(arg_path) helper:close() if ( not(status) ) then return fail("Failed to retrieve server headers") end return stdnse.format_output(true, response.rawheaders) end