|
|
@ -265,6 +265,7 @@ checkHEAD = function (host, URL, r, retry, sanity) |
|
|
|
-header "" - add extra headers. |
|
|
|
-L - DO follow redirects. |
|
|
|
--max-redirs n - set maximum redirects, default is 50, -1 = unlimited. |
|
|
|
-4 or -6 - Only use IPv4 or IPv6 |
|
|
|
--retry n - maximum retries, default is 0, no retries. |
|
|
|
-o file - write to file instead of stdout. |
|
|
|
--path-as-is - https://curl.haxx.se/libcurl/c/CURLOPT_PATH_AS_IS.html might be useful for URLSanity. |
|
|
@ -274,7 +275,7 @@ checkHEAD = function (host, URL, r, retry, sanity) |
|
|
|
-D file - write the received headers to a file. This includes the status code and string. |
|
|
|
]] |
|
|
|
local status = APT.exe( |
|
|
|
'curl -I --retry 0 -s --path-as-is --connect-timeout ' .. APT.options.timeout.value .. ' --max-redirs 0 ' .. |
|
|
|
'curl -I --retry 0 -s --path-as-is --connect-timeout ' .. APT.options.timeout.value .. ' --max-redirs 0 ' .. APT.IPv46 .. ' ' .. |
|
|
|
IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. |
|
|
|
hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' |
|
|
|
):Nice():log():Do().status |
|
|
@ -519,6 +520,7 @@ local download = "curl" .. |
|
|
|
" --create-dirs -f -L" .. |
|
|
|
" --fail-early" .. |
|
|
|
" --max-time " .. APT.options.maxtime.value .. |
|
|
|
APT.IPv46 .. ' ' .. |
|
|
|
" --retry " .. APT.options.retries.value .. |
|
|
|
" -R -v -z 'results/stamp.old' --stderr results/" |
|
|
|
local downloads = function(host, URL, meta, release, list) |
|
|
@ -1025,9 +1027,9 @@ if 0 < #arg then |
|
|
|
APT.allpairs(ips, |
|
|
|
function(k, v) |
|
|
|
if v == "A" then |
|
|
|
if APT.testing("IPv4") then APT.exe("./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k .. " " .. file):Nice():log():fork() end |
|
|
|
if APT.testing("IPv4") then APT.exe('./apt-panopticon.lua ' .. sendArgs .. ' -4 ' .. pu.host .. path .. ' ' .. k .. ' ' .. file):Nice():log():fork() end |
|
|
|
elseif v == "AAAA" then |
|
|
|
if APT.testing("IPv6") then APT.exe("./apt-panopticon.lua " .. sendArgs .. " " .. pu.host .. path .. " " .. k .. " " .. file):Nice():log():fork() end |
|
|
|
if APT.testing("IPv6") then APT.exe('./apt-panopticon.lua ' .. sendArgs .. ' -6 ' .. APT.IPv46 .. ' ' .. pu.host .. path .. ' ' .. k .. ' ' .. file):Nice():log():fork() end |
|
|
|
end |
|
|
|
D('logging to ' .. APT.logName(pu.host, k, file)[2]) |
|
|
|
end |
|
|
|