1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00

Fixed a bug that would incorrectly parse the url scheme [Patrik]

This commit is contained in:
patrik
2011-12-17 19:45:48 +00:00
parent 165b58f3d3
commit 156e89c597

View File

@@ -363,10 +363,10 @@ URL = {
self.file = self.raw:match("^http[s]?://[^:/]*[:]?%d*(/[^\#]*)") or '/'
self.port = tonumber(self.port)
if ( not(self.port) ) then
if ( self.proto:match("http") ) then
self.port = 80
elseif ( self.proto:match("https")) then
self.port = 443
if ( self.proto:match("https") ) then
self.port = 443
elseif ( self.proto:match("http")) then
self.port = 80
end
end