mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Check torrent/magnet parsing result
This commit is contained in:
parent
99b9735715
commit
6f648be471
1 changed files with 8 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue