diff options
author | onefang | 2019-11-24 05:55:45 +1000 |
---|---|---|
committer | onefang | 2019-11-24 05:55:45 +1000 |
commit | 0c03bf0cf20ac424e8aff5999945ec1d3fc2fea0 (patch) | |
tree | ca9f53b074994b6d407b946807ab75ae0c663302 | |
parent | Reverese lookup the DNS-RR names. (diff) | |
download | apt-panopticon-0c03bf0cf20ac424e8aff5999945ec1d3fc2fea0.zip apt-panopticon-0c03bf0cf20ac424e8aff5999945ec1d3fc2fea0.tar.gz apt-panopticon-0c03bf0cf20ac424e8aff5999945ec1d3fc2fea0.tar.bz2 apt-panopticon-0c03bf0cf20ac424e8aff5999945ec1d3fc2fea0.tar.xz |
Mark DNS entries that are in DNS-RR.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon-report-web.lua | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/apt-panopticon-report-web.lua b/apt-panopticon-report-web.lua index f17bf54..33b8fe2 100755 --- a/apt-panopticon-report-web.lua +++ b/apt-panopticon-report-web.lua | |||
@@ -124,17 +124,22 @@ local C = function(s) log(-1, "CRITICAL", s) end | |||
124 | local mirrors = loadfile("results/mirrors.lua")() | 124 | local mirrors = loadfile("results/mirrors.lua")() |
125 | 125 | ||
126 | local revDNS = function(dom, IP) | 126 | local revDNS = function(dom, IP) |
127 | if "deb.devuan.org" ~= dom then return "" end | 127 | if "deb.devuan.org" ~= dom then |
128 | for k, v in pairs(mirrors) do | 128 | if nil ~= mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][IP] then |
129 | if "deb.devuan.org" ~= k then | 129 | return "DNS-RR" |
130 | local IPs = v.IPs | 130 | end |
131 | for i, u in pairs(IPs) do | 131 | else |
132 | if "table" == type(u) then | 132 | for k, v in pairs(mirrors) do |
133 | for h, t in pairs(u) do | 133 | if "deb.devuan.org" ~= k then |
134 | if IP == h then return k end | 134 | local IPs = v.IPs |
135 | for i, u in pairs(IPs) do | ||
136 | if "table" == type(u) then | ||
137 | for h, t in pairs(u) do | ||
138 | if IP == h then return k end | ||
139 | end | ||
140 | else | ||
141 | if IP == i then return k end | ||
135 | end | 142 | end |
136 | else | ||
137 | if IP == i then return k end | ||
138 | end | 143 | end |
139 | end | 144 | end |
140 | end | 145 | end |