mirror of
https://github.com/nmap/nmap.git
synced 2026-09-06 10:29:46 +00:00
Handle redirect URLs without a host, e.g. https:///path
This commit is contained in:
parent
1b1a85cc6b
commit
8515e83671
2 changed files with 8 additions and 4 deletions
|
|
@ -445,8 +445,10 @@ URL = {
|
|||
self.file = url.absolute("", self.file)
|
||||
self.path = url.absolute("", self.path)
|
||||
self.dir = self.path:match("^(.+%/)") or "/"
|
||||
-- TODO: Use public suffix list to extract domain
|
||||
self.domain= self.host:match("^[^%.]-%.(.*)")
|
||||
if self.host then
|
||||
-- TODO: Use public suffix list to extract domain
|
||||
self.domain= self.host:match("^[^%.]-%.(.*)")
|
||||
end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue