mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fixed a bug that would incorrectly parse the url scheme [Patrik]
This commit is contained in:
parent
165b58f3d3
commit
156e89c597
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue