mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Properly parse udp tracker port number
This commit is contained in:
parent
fe4830dbf7
commit
6d93755fe6
1 changed files with 2 additions and 1 deletions
|
|
@ -954,7 +954,8 @@ Torrent =
|
|||
-- peers. For a good specification refer to:
|
||||
-- http://www.rasterbar.com/products/libtorrent/udp_tracker_protocol.html
|
||||
udp_tracker_peers = function(self, tracker)
|
||||
local host, port = tracker:match("^udp://(.-):(.+)")
|
||||
local host, port = tracker:match("^udp://(.-):(%d+)")
|
||||
port = tonumber(port)
|
||||
if (not host) or (not port) then
|
||||
return false, "Could not parse tracker url"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue