diff options
author | onefang | 2019-12-12 20:24:29 +1000 |
---|---|---|
committer | onefang | 2019-12-12 20:24:29 +1000 |
commit | a1313dd07fa9cb7c7c28c617e628ef8b9f44ae37 (patch) | |
tree | 2df838040b6de3a8052bf9ac54fbdb22e61fd084 | |
parent | Time how long it takes. (diff) | |
download | apt-panopticon-a1313dd07fa9cb7c7c28c617e628ef8b9f44ae37.zip apt-panopticon-a1313dd07fa9cb7c7c28c617e628ef8b9f44ae37.tar.gz apt-panopticon-a1313dd07fa9cb7c7c28c617e628ef8b9f44ae37.tar.bz2 apt-panopticon-a1313dd07fa9cb7c7c28c617e628ef8b9f44ae37.tar.xz |
Comment++
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index d3cb7be..62acbf25 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -175,6 +175,9 @@ local IP = {} | |||
175 | gatherIPs = function (host) | 175 | gatherIPs = function (host) |
176 | if nil == IP[host] then | 176 | if nil == IP[host] then |
177 | local IPs | 177 | local IPs |
178 | -- Takes about 30 seconds to look up the lot. | ||
179 | -- I tested using dig's -f option, it didn't seem much faster. | ||
180 | -- The sort -r assumes that deb.devuan.org is the first alphabetically. | ||
178 | local dig = io.popen('dig +keepopen +noall +nottlid +answer ' .. host .. ' A ' .. host .. ' AAAA ' .. host .. ' CNAME ' .. host .. ' SRV | sort -r | uniq') | 181 | local dig = io.popen('dig +keepopen +noall +nottlid +answer ' .. host .. ' A ' .. host .. ' AAAA ' .. host .. ' CNAME ' .. host .. ' SRV | sort -r | uniq') |
179 | repeat | 182 | repeat |
180 | IPs = dig:read("*l") | 183 | IPs = dig:read("*l") |