diff --git a/nmap/http-get.nse b/nmap/http-get.nse
index b9c75b9..b63a438 100644
--- a/nmap/http-get.nse
+++ b/nmap/http-get.nse
@@ -32,16 +32,19 @@ local http = require "http"
local stdnse = require "stdnse"
action = function(host, port)
- local path = ""
local scheme = ""
+ local hostaddress = (host.name ~= '' and host.name) or host.ip
+ local path = ""
+
+ if (port.service == "ssl") then
+ scheme = "https"
+ else
+ scheme = port.service
+ end
if(stdnse.get_script_args('http-get.path')) then
path = "/" .. stdnse.get_script_args('http-get.path')
end
- if (port.service == "ssl") then scheme = "https"
- else scheme = port.service
- end
-
- return http.get_url( scheme.."://"..(host.name or host.ip)..":"..port.number.."/"..path, {redirect_ok=true} )
+ return http.get_url(scheme.."://"..hostaddress..":"..port.number.."/"..path)
end
diff --git a/results.xsl b/results.xsl
index f2bdd51..ec52bb4 100644
--- a/results.xsl
+++ b/results.xsl
@@ -3,7 +3,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.1">
-