From bad00aa68529cb288526cd3ca33236d225e14feb Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 18 Oct 2022 09:54:44 +1000 Subject: ;; Warning, extra type option --- apt-panopticon.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index dcae1ad..bf9d9a7 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -179,7 +179,8 @@ gatherIPs = function (host) -- Takes about 30 seconds to look up the lot. -- I tested using dig's -f option, it didn't seem much faster. -- The sort -r assumes that deb.devuan.org is the first alphabetically. - local dig = APT.readCmd('dig +keepopen +noall +nottlid +answer ' .. host .. ' A ' .. host .. ' AAAA ' .. host .. ' CNAME ' .. host .. ' SRV | sort -r | uniq') + if "" == host then print("Empty host name!") end + local dig = APT.readCmd('dig ' .. again .. ' +keepopen +noall +nottlid +answer ' .. host .. ' A ' .. host .. ' AAAA ' .. host .. ' CNAME ' .. host .. ' SRV | sort -r | uniq') for i,IPs in ipairs(dig) do for k, t, v in IPs:gmatch("([%w_%-%.]*)%.%s*IN%s*(%a*)%s*(.*)") do if "." == v:sub(-1, -1) then v = v:sub(1, -2) end -- cgit v1.1