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:
@@ -363,10 +363,10 @@ URL = {
|
|||||||
self.file = self.raw:match("^http[s]?://[^:/]*[:]?%d*(/[^\#]*)") or '/'
|
self.file = self.raw:match("^http[s]?://[^:/]*[:]?%d*(/[^\#]*)") or '/'
|
||||||
self.port = tonumber(self.port)
|
self.port = tonumber(self.port)
|
||||||
if ( not(self.port) ) then
|
if ( not(self.port) ) then
|
||||||
if ( self.proto:match("http") ) then
|
if ( self.proto:match("https") ) then
|
||||||
self.port = 80
|
self.port = 443
|
||||||
elseif ( self.proto:match("https")) then
|
elseif ( self.proto:match("http")) then
|
||||||
self.port = 443
|
self.port = 80
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user