aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2022-10-18 09:54:44 +1000
committeronefang2022-10-18 09:54:44 +1000
commitbad00aa68529cb288526cd3ca33236d225e14feb (patch)
treeb73e5ad7912be15e26477366de8f637bbfd056dc
parentCater for more mirrors. (diff)
downloadapt-panopticon-bad00aa68529cb288526cd3ca33236d225e14feb.zip
apt-panopticon-bad00aa68529cb288526cd3ca33236d225e14feb.tar.gz
apt-panopticon-bad00aa68529cb288526cd3ca33236d225e14feb.tar.bz2
apt-panopticon-bad00aa68529cb288526cd3ca33236d225e14feb.tar.xz
;; Warning, extra type option
-rwxr-xr-xapt-panopticon.lua3
1 files changed, 2 insertions, 1 deletions
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)
179 -- Takes about 30 seconds to look up the lot. 179 -- Takes about 30 seconds to look up the lot.
180 -- I tested using dig's -f option, it didn't seem much faster. 180 -- I tested using dig's -f option, it didn't seem much faster.
181 -- The sort -r assumes that deb.devuan.org is the first alphabetically. 181 -- The sort -r assumes that deb.devuan.org is the first alphabetically.
182 local dig = APT.readCmd('dig +keepopen +noall +nottlid +answer ' .. host .. ' A ' .. host .. ' AAAA ' .. host .. ' CNAME ' .. host .. ' SRV | sort -r | uniq') 182 if "" == host then print("Empty host name!") end
183 local dig = APT.readCmd('dig ' .. again .. ' +keepopen +noall +nottlid +answer ' .. host .. ' A ' .. host .. ' AAAA ' .. host .. ' CNAME ' .. host .. ' SRV | sort -r | uniq')
183 for i,IPs in ipairs(dig) do 184 for i,IPs in ipairs(dig) do
184 for k, t, v in IPs:gmatch("([%w_%-%.]*)%.%s*IN%s*(%a*)%s*(.*)") do 185 for k, t, v in IPs:gmatch("([%w_%-%.]*)%.%s*IN%s*(%a*)%s*(.*)") do
185 if "." == v:sub(-1, -1) then v = v:sub(1, -2) end 186 if "." == v:sub(-1, -1) then v = v:sub(1, -2) end