From b7f648bcac52238b45b7c40c7983629532feadff Mon Sep 17 00:00:00 2001 From: patrik Date: Wed, 6 Jun 2012 22:11:02 +0000 Subject: [PATCH] Fixed a bunch of errors reported by Ron Bowes; http://seclists.org/nmap-dev/2012/q2/639 --- nselib/ajp.lua | 2 ++ nselib/xmpp.lua | 2 +- scripts/afp-serverinfo.nse | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nselib/ajp.lua b/nselib/ajp.lua index cd9a2f346..77501a515 100644 --- a/nselib/ajp.lua +++ b/nselib/ajp.lua @@ -521,3 +521,5 @@ Helper = { end, } + +return _ENV; \ No newline at end of file diff --git a/nselib/xmpp.lua b/nselib/xmpp.lua index f55bdb642..b43add7be 100644 --- a/nselib/xmpp.lua +++ b/nselib/xmpp.lua @@ -121,7 +121,7 @@ XMPP = { options = options or {}, auth = { mechs = {} } } o.options.timeout = o.options.timeout and o.options.timeout or 10 - o.servername = host.targetname or o.options.servername + o.servername = stdnse.get_hostname(host) or o.options.servername setmetatable(o, self) self.__index = self return o diff --git a/scripts/afp-serverinfo.nse b/scripts/afp-serverinfo.nse index ce4689fbb..0e17450dc 100644 --- a/scripts/afp-serverinfo.nse +++ b/scripts/afp-serverinfo.nse @@ -73,7 +73,7 @@ action = function(host, port) -- get our data afp_proto = afp.Proto:new( { socket=socket } ) - response = afp_proto:fp_get_server_info( socket ) + local response = afp_proto:fp_get_server_info( socket ) response = response.result -- all the server information is output in the order it occurs in the server