diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 3 |
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 |