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.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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user