1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Check torrent/magnet parsing result

This commit is contained in:
dmiller
2018-05-04 05:03:14 +00:00
parent 99b9735715
commit 6f648be471

View File

@@ -64,9 +64,15 @@ action = function()
local t = bittorrent.Torrent:new()
if filename then
t:load_from_file(filename)
local status, err = t:load_from_file(filename)
if not status then
return stdnse.format_output(false, err)
end
elseif magnet then
t:load_from_magnet(magnet)
local status, err = t:load_from_magnet(magnet)
if not status then
return stdnse.format_output(false, err)
end
end
t:trackers_peers()
t:dht_peers(timeout)