diff options
Diffstat (limited to 'apt-panopticon.lua')
-rwxr-xr-x | apt-panopticon.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 8fd39e5..93243a4 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -330,7 +330,7 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
330 | 'curl -I --retry 0 -s --path-as-is --connect-timeout ' .. APT.options.timeout.value .. ' --max-redirs 0 ' .. APT.IPv46 .. ' ' .. | 330 | 'curl -I --retry 0 -s --path-as-is --connect-timeout ' .. APT.options.timeout.value .. ' --max-redirs 0 ' .. APT.IPv46 .. ' ' .. |
331 | IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. | 331 | IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. |
332 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' | 332 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' |
333 | ):Nice():log():Do().status | 333 | ):timeout(APT.options.maxtime.value * 2.0):Nice():log():Do().status |
334 | if 0 < r then | 334 | if 0 < r then |
335 | APT.tested(PU.scheme, 'Redirects', host) | 335 | APT.tested(PU.scheme, 'Redirects', host) |
336 | else | 336 | else |
@@ -356,7 +356,7 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
356 | if 0 ~= status then | 356 | if 0 ~= status then |
357 | local msg = curlStatus[status] | 357 | local msg = curlStatus[status] |
358 | if nil == msg then msg = "UNKNOWN CURL STATUS CODE!" end | 358 | if nil == msg then msg = "UNKNOWN CURL STATUS CODE!" end |
359 | if (28 == status) or (7 == status) then | 359 | if (128+9 == status) or (124 == status) or (28 == status) or (7 == status) then |
360 | T(spcd .. spcd .. "TIMEOUT " .. timeouts + 1 .. ", retry " .. retry + 1 .. ' ' .. APT.lnk(URL), PU.scheme, sanity, host) | 360 | T(spcd .. spcd .. "TIMEOUT " .. timeouts + 1 .. ", retry " .. retry + 1 .. ' ' .. APT.lnk(URL), PU.scheme, sanity, host) |
361 | timeouts = timeouts + 1 | 361 | timeouts = timeouts + 1 |
362 | else | 362 | else |
@@ -447,7 +447,7 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
447 | local pth = path:match('^(.*/pool/).*$') | 447 | local pth = path:match('^(.*/pool/).*$') |
448 | if nil ~= pth then table.insert(APT.results[PU.scheme].redirects, pu.host .. "/" .. pth) else E(spcd .. spcd .. 'Odd redirect path ' .. path) end | 448 | if nil ~= pth then table.insert(APT.results[PU.scheme].redirects, pu.host .. "/" .. pth) else E(spcd .. spcd .. 'Odd redirect path ' .. path) end |
449 | I(spcd .. spcd .. "Now checking redirected host " .. u .. ' for ' .. APT.lnk(URL) .. arw .. APT.lnk(location), host) | 449 | I(spcd .. spcd .. "Now checking redirected host " .. u .. ' for ' .. APT.lnk(URL) .. arw .. APT.lnk(location), host) |
450 | APT.exe(downloadLock .. "REDIR-" .. check .. ".log.txt" .. " ./apt-panopticon.lua " .. extraArgs .. ' ' .. pu.host .. "/" .. path .. " " .. file):Nice():log():fork() | 450 | APT.exe(downloadLock .. "REDIR-" .. check .. ".log.txt" .. " ./apt-panopticon.lua " .. extraArgs .. ' ' .. pu.host .. "/" .. path .. " " .. file):timeout(APT.options.maxtime.value * 2.0):Nice():log():fork(pu.host) |
451 | D(spcd .. 'logging to ' .. APT.logName(pu.host, nil, file)[2]) | 451 | D(spcd .. 'logging to ' .. APT.logName(pu.host, nil, file)[2]) |
452 | APT.tested(PU.scheme, 'Redirects', host) | 452 | APT.tested(PU.scheme, 'Redirects', host) |
453 | end | 453 | end |
@@ -534,7 +534,7 @@ checkHost = function (orig, host, path, ip, file) | |||
534 | else | 534 | else |
535 | if orig == host then | 535 | if orig == host then |
536 | I("Testing mirror " .. orig .. "" .. file) | 536 | I("Testing mirror " .. orig .. "" .. file) |
537 | APT.exe("./apt-panopticon.lua " .. sendArgs .. " -o " .. orig .. path .. " " .. file):Nice():log():fork() | 537 | APT.exe("./apt-panopticon.lua " .. sendArgs .. " -o " .. orig .. path .. " " .. file):timeout(APT.options.maxtime.value * 2.0):Nice():log():fork(orig) |
538 | D('logging to ' .. APT.logName(ph.host, nil, file)[2]) | 538 | D('logging to ' .. APT.logName(ph.host, nil, file)[2]) |
539 | else D("checkHost " .. orig .. arw .. host) end | 539 | else D("checkHost " .. orig .. arw .. host) end |
540 | end | 540 | end |
@@ -618,7 +618,7 @@ local downloads = function(host, URL, meta, release, list) | |||
618 | end | 618 | end |
619 | end | 619 | end |
620 | f:close() | 620 | f:close() |
621 | APT.exe(cm):Nice():log():fork() | 621 | APT.exe(cm):timeout(APT.options.maxtime.value * 2.0):Nice():log():fork(host) |
622 | D('logging to <a href="' .. log .. '">' .. log .. '</a>, with <a href="' .. files .. '">these files</a>') | 622 | D('logging to <a href="' .. log .. '">' .. log .. '</a>, with <a href="' .. files .. '">these files</a>') |
623 | end | 623 | end |
624 | 624 | ||
@@ -1129,9 +1129,9 @@ if 0 < #arg then | |||
1129 | APT.allpairs(ips, | 1129 | APT.allpairs(ips, |
1130 | function(k, v) | 1130 | function(k, v) |
1131 | if v == "A" then | 1131 | if v == "A" then |
1132 | if APT.testing("IPv4") then APT.exe('./apt-panopticon.lua ' .. sendArgs .. ' -4 ' .. pu.host .. path .. ' ' .. k .. ' ' .. file):Nice():log():fork() end | 1132 | if APT.testing("IPv4") then APT.exe('./apt-panopticon.lua ' .. sendArgs .. ' -4 ' .. pu.host .. path .. ' ' .. k .. ' ' .. file):timeout(APT.options.maxtime.value * 2.0):Nice():log():fork(pu.host) end |
1133 | elseif v == "AAAA" then | 1133 | elseif v == "AAAA" then |
1134 | if APT.testing("IPv6") then APT.exe('./apt-panopticon.lua ' .. sendArgs .. ' -6 ' .. APT.IPv46 .. ' ' .. pu.host .. path .. ' ' .. k .. ' ' .. file):Nice():log():fork() end | 1134 | if APT.testing("IPv6") then APT.exe('./apt-panopticon.lua ' .. sendArgs .. ' -6 ' .. APT.IPv46 .. ' ' .. pu.host .. path .. ' ' .. k .. ' ' .. file):timeout(APT.options.maxtime.value * 2.0):Nice():log():fork(pu.host) end |
1135 | end | 1135 | end |
1136 | D('logging to ' .. APT.logName(pu.host, k, file)[2]) | 1136 | D('logging to ' .. APT.logName(pu.host, k, file)[2]) |
1137 | end | 1137 | end |