diff options
Diffstat (limited to '')
| -rwxr-xr-x | apt-panopticon-report-email-web.lua | 82 |
1 files changed, 22 insertions, 60 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 7d5ce7f..5598515 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
| @@ -205,33 +205,20 @@ if nil == email then C("opening mirrors file - " .. e) else | |||
| 205 | 205 | ||
| 206 | -- DNS-RR test. | 206 | -- DNS-RR test. |
| 207 | if ("deb.devuan.org" ~= k) and (nil ~= APT.mirrors["deb.devuan.org"]) then | 207 | if ("deb.devuan.org" ~= k) and (nil ~= APT.mirrors["deb.devuan.org"]) then |
| 208 | for l, w in pairs(APT.mirrors[k].IPs) do | 208 | APT.allpairs(APT.mirrors[k].IPs, |
| 209 | if type(w) == "table" then | 209 | function(i, w, k, v) |
| 210 | for i, u in pairs(w) do | 210 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][i] then |
| 211 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][i] then | 211 | local log = logCount("deb.devuan.org", i) |
| 212 | local log = logCount("deb.devuan.org", i) | ||
| 213 | if "" ~= log then | ||
| 214 | if "" == dns then dns = " " else dns = dns .. " " end | ||
| 215 | dns = dns .. logCount("deb.devuan.org", i) | ||
| 216 | else | ||
| 217 | if "" == dns then dns = " " else dns = dns .. " " end | ||
| 218 | dns = dns .. i | ||
| 219 | end | ||
| 220 | end | ||
| 221 | end | ||
| 222 | else | ||
| 223 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][l] then | ||
| 224 | local log = logCount("deb.devuan.org", l) | ||
| 225 | if "" ~= log then | 212 | if "" ~= log then |
| 226 | if "" == dns then dns = " " else dns = dns .. " " end | 213 | if "" == dns then dns = " " else dns = dns .. " " end |
| 227 | dns = dns .. log | 214 | dns = dns .. logCount("deb.devuan.org", i) |
| 228 | else | 215 | else |
| 229 | if "" == dns then dns = " " else dns = dns .. " " end | 216 | if "" == dns then dns = " " else dns = dns .. " " end |
| 230 | dns = dns .. l | 217 | dns = dns .. i |
| 231 | end | 218 | end |
| 232 | end | 219 | end |
| 233 | end | 220 | end |
| 234 | end | 221 | ) |
| 235 | if "" == dns then dns = "[no]" end | 222 | if "" == dns then dns = "[no]" end |
| 236 | dns = " DNS-RR: " .. dns | 223 | dns = " DNS-RR: " .. dns |
| 237 | end | 224 | end |
| @@ -396,33 +383,20 @@ if nil == web then C("opening mirrors file - " .. e) else | |||
| 396 | 383 | ||
| 397 | -- DNS-RR test. | 384 | -- DNS-RR test. |
| 398 | if ("deb.devuan.org" ~= k) and (nil ~= APT.mirrors["deb.devuan.org"]) then | 385 | if ("deb.devuan.org" ~= k) and (nil ~= APT.mirrors["deb.devuan.org"]) then |
| 399 | for l, w in pairs(APT.mirrors[k].IPs) do | 386 | APT.allpairs(APT.mirrors[k].IPs, |
| 400 | if type(w) == "table" then | 387 | function(i, w, k, v) |
| 401 | for i, u in pairs(w) do | 388 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][i] then |
| 402 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][i] then | 389 | local log = logCount("deb.devuan.org", i) |
| 403 | local log = logCount("deb.devuan.org", i) | ||
| 404 | if "" ~= log then | ||
| 405 | if "" == dns then dns = " " else dns = dns .. " " end | ||
| 406 | dns = dns .. logCount("deb.devuan.org", i) | ||
| 407 | else | ||
| 408 | if "" == dns then dns = " " else dns = dns .. " " end | ||
| 409 | dns = dns .. "<font color='maroon'><b>" .. i .. "</b></font>" | ||
| 410 | end | ||
| 411 | end | ||
| 412 | end | ||
| 413 | else | ||
| 414 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][l] then | ||
| 415 | local log = logCount("deb.devuan.org", l) | ||
| 416 | if "" ~= log then | 390 | if "" ~= log then |
| 417 | if "" == dns then dns = " " else dns = dns .. " " end | 391 | if "" == dns then dns = " " else dns = dns .. " " end |
| 418 | dns = dns .. log | 392 | dns = dns .. logCount("deb.devuan.org", i) |
| 419 | else | 393 | else |
| 420 | if "" == dns then dns = " " else dns = dns .. " " end | 394 | if "" == dns then dns = " " else dns = dns .. " " end |
| 421 | dns = dns .. "<font color='maroon'><b>" .. l .. "</b></font>" | 395 | dns = dns .. "<font color='maroon'><b>" .. i .. "</b></font>" |
| 422 | end | 396 | end |
| 423 | end | 397 | end |
| 424 | end | 398 | end |
| 425 | end | 399 | ) |
| 426 | if "" == dns then dns = "<font color='grey'><b>no</b></font>" end | 400 | if "" == dns then dns = "<font color='grey'><b>no</b></font>" end |
| 427 | 401 | ||
| 428 | if 0 == max then | 402 | if 0 == max then |
| @@ -495,6 +469,7 @@ if nil == web then C("opening mirrors file - " .. e) else | |||
| 495 | APT.mirrors[k].BaseURL = nil | 469 | APT.mirrors[k].BaseURL = nil |
| 496 | APT.mirrors[k].Country = nil | 470 | APT.mirrors[k].Country = nil |
| 497 | APT.mirrors[k].Bandwidth = nil | 471 | APT.mirrors[k].Bandwidth = nil |
| 472 | |||
| 498 | for l, w in pairs(APT.mirrors[k].IPs) do | 473 | for l, w in pairs(APT.mirrors[k].IPs) do |
| 499 | if type(w) == "table" then | 474 | if type(w) == "table" then |
| 500 | n[l] = {} | 475 | n[l] = {} |
| @@ -564,33 +539,20 @@ if nil == web then C("opening mirrors file - " .. e) else | |||
| 564 | 539 | ||
| 565 | -- DNS-RR test. | 540 | -- DNS-RR test. |
| 566 | if ("deb.devuan.org" ~= k) and (nil ~= APT.debians["deb.devuan.org"]) then | 541 | if ("deb.devuan.org" ~= k) and (nil ~= APT.debians["deb.devuan.org"]) then |
| 567 | for l, w in pairs(APT.debians[k].IPs) do | 542 | APT.allpairs(APT.debians[k].IPs, |
| 568 | if type(w) == "table" then | 543 | function(i, w, k, v) |
| 569 | for i, u in pairs(w) do | 544 | if nil ~= APT.mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][i] then |
| 570 | if nil ~= APT.debians["deb.devuan.org"].IPs["deb.roundr.devuan.org"][i] then | 545 | local log = logCount("deb.devuan.org", i) |
| 571 | local log = logCount("deb.devuan.org", i) | ||
| 572 | if "" ~= log then | ||
| 573 | if "" == dns then dns = " " else dns = dns .. " " end | ||
| 574 | dns = dns .. logCount("deb.devuan.org", i) | ||
| 575 | else | ||
| 576 | if "" == dns then dns = " " else dns = dns .. " " end | ||
| 577 | dns = dns .. "<font color='maroon'><b>" .. i .. "</b></font>" | ||
| 578 | end | ||
| 579 | end | ||
| 580 | end | ||
| 581 | else | ||
| 582 | if nil ~= APT.debians["deb.devuan.org"].IPs["deb.roundr.devuan.org"][l] then | ||
| 583 | local log = logCount("deb.devuan.org", l) | ||
| 584 | if "" ~= log then | 546 | if "" ~= log then |
| 585 | if "" == dns then dns = " " else dns = dns .. " " end | 547 | if "" == dns then dns = " " else dns = dns .. " " end |
| 586 | dns = dns .. log | 548 | dns = dns .. logCount("deb.devuan.org", i) |
| 587 | else | 549 | else |
| 588 | if "" == dns then dns = " " else dns = dns .. " " end | 550 | if "" == dns then dns = " " else dns = dns .. " " end |
| 589 | dns = dns .. "<font color='maroon'><b>" .. l .. "</b></font>" | 551 | dns = dns .. "<font color='maroon'><b>" .. i .. "</b></font>" |
| 590 | end | 552 | end |
| 591 | end | 553 | end |
| 592 | end | 554 | end |
| 593 | end | 555 | ) |
| 594 | if "" == dns then dns = "<font color='grey'><b>no</b></font>" end | 556 | if "" == dns then dns = "<font color='grey'><b>no</b></font>" end |
| 595 | 557 | ||
| 596 | if 0 == max then | 558 | if 0 == max then |
