aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-11-24 06:37:31 +1000
committeronefang2019-11-24 06:37:31 +1000
commit429ff902862de3fcce22d31ea555e1c69df1976e (patch)
treefb980a47c81757f7ba17b2767515fb31fa091833
parentSpace sentences properly on the web. (diff)
downloadapt-panopticon-429ff902862de3fcce22d31ea555e1c69df1976e.zip
apt-panopticon-429ff902862de3fcce22d31ea555e1c69df1976e.tar.gz
apt-panopticon-429ff902862de3fcce22d31ea555e1c69df1976e.tar.bz2
apt-panopticon-429ff902862de3fcce22d31ea555e1c69df1976e.tar.xz
Implement DNS-RR test fully.
Diffstat (limited to '')
-rwxr-xr-xapt-panopticon-report-web.lua8
-rwxr-xr-xapt-panopticon.lua10
2 files changed, 11 insertions, 7 deletions
diff --git a/apt-panopticon-report-web.lua b/apt-panopticon-report-web.lua
index 810ac45..7ebf2d3 100755
--- a/apt-panopticon-report-web.lua
+++ b/apt-panopticon-report-web.lua
@@ -125,8 +125,10 @@ local mirrors = loadfile("results/mirrors.lua")()
125 125
126local revDNS = function(dom, IP) 126local revDNS = function(dom, IP)
127 if "deb.devuan.org" ~= dom then 127 if "deb.devuan.org" ~= dom then
128 if nil ~= mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][IP] then 128 if nil ~= mirrors["deb.devuan.org"] then
129 return "DNS-RR" 129 if nil ~= mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][IP] then
130 return "DNS-RR"
131 end
130 end 132 end
131 else 133 else
132 for k, v in pairs(mirrors) do 134 for k, v in pairs(mirrors) do
@@ -278,7 +280,7 @@ if nil == file then C("opening mirrors file - " .. e) else
278 local updated = "[<font color='gray'><b>skip</b></font>]" 280 local updated = "[<font color='gray'><b>skip</b></font>]"
279 281
280 -- DNS-RR test. 282 -- DNS-RR test.
281 if "deb.devuan.org" ~= k then 283 if ("deb.devuan.org" ~= k) and (nil ~= mirrors["deb.devuan.org"]) then
282 for l, w in pairs(mirrors[k].IPs) do 284 for l, w in pairs(mirrors[k].IPs) do
283 if type(w) == "table" then 285 if type(w) == "table" then
284 for i, u in pairs(w) do 286 for i, u in pairs(w) do
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 2058b4e..9f4d073 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -41,7 +41,7 @@ options =
41 "http", 41 "http",
42 "https", 42 "https",
43-- "rsync", 43-- "rsync",
44-- "DNS-RR", 44 "DNSRR",
45 "Protocol", 45 "Protocol",
46-- "URL-Sanity", 46-- "URL-Sanity",
47-- "Integrity", 47-- "Integrity",
@@ -652,9 +652,11 @@ local getMirrors = function ()
652 mirrors[host] = m 652 mirrors[host] = m
653 end 653 end
654 end 654 end
655 mirrors[options.roundRobin.value] = { ["Protocols"] = { ["http"] = true; ["https"] = true; }; ["FQDN"] = 'deb.devuan.org'; ["Active"] = 'yes'; ["BaseURL"] = 'deb.devuan.org'; } 655 if testing("DNSRR") then
656 gatherIPs(options.roundRobin.value) 656 mirrors[options.roundRobin.value] = { ["Protocols"] = { ["http"] = true; ["https"] = true; }; ["FQDN"] = 'deb.devuan.org'; ["Active"] = 'yes'; ["BaseURL"] = 'deb.devuan.org'; }
657 mirrors[options.roundRobin.value].IPs = IP[options.roundRobin.value] 657 gatherIPs(options.roundRobin.value)
658 mirrors[options.roundRobin.value].IPs = IP[options.roundRobin.value]
659 end
658 local file, e = io.open("results/mirrors.lua", "w+") 660 local file, e = io.open("results/mirrors.lua", "w+")
659 if nil == file then C("opening mirrors file - " .. e) else 661 if nil == file then C("opening mirrors file - " .. e) else
660 file:write(dumpTable(mirrors, "", "mirrors") .. "\nreturn mirrors\n") 662 file:write(dumpTable(mirrors, "", "mirrors") .. "\nreturn mirrors\n")