aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-11-12 04:48:40 +1000
committeronefang2019-11-12 04:48:40 +1000
commita0358bb5072bfe37949751eede7ad9e8e4090e1a (patch)
tree88e335c4dacc09d2a14ee01ae58db44d6e23281e
parentRewrite the lua-sec checks using command line curl instead. (diff)
downloadapt-panopticon-a0358bb5072bfe37949751eede7ad9e8e4090e1a.zip
apt-panopticon-a0358bb5072bfe37949751eede7ad9e8e4090e1a.tar.gz
apt-panopticon-a0358bb5072bfe37949751eede7ad9e8e4090e1a.tar.bz2
apt-panopticon-a0358bb5072bfe37949751eede7ad9e8e4090e1a.tar.xz
Hide the cat and rm errors, though we probably should log them instead.
-rwxr-xr-xapt-panopticon.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index c536990..da0e782 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -313,7 +313,7 @@ checkHEAD = function (host, URL, r, retry)
313 hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' 313 hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"'
314 local rslt, status = execute(cmd) 314 local rslt, status = execute(cmd)
315 os.execute("sleep 2") 315 os.execute("sleep 2")
316 os.execute('cat results/"HEADERS_' .. fname .. '" >>results/"STATUS_' .. fname .. '"; rm results/"HEADERS_' .. fname .. '"') 316 os.execute('cat results/"HEADERS_' .. fname .. '" >>results/"STATUS_' .. fname .. '" 2>/dev/null; rm results/"HEADERS_' .. fname .. '" 2>/dev/null')
317 if "exit" == rslt then 317 if "exit" == rslt then
318 if 28 == status then 318 if 28 == status then
319 E(" TIMEOUT!", PU.scheme, "", host) 319 E(" TIMEOUT!", PU.scheme, "", host)
@@ -346,7 +346,7 @@ checkHEAD = function (host, URL, r, retry)
346 end 346 end
347 end 347 end
348 end 348 end
349 os.execute('rm results/"STATUS_' .. fname .. '"') 349 os.execute('rm results/"STATUS_' .. fname .. '" 2>/dev/null')
350 if ("4" == tostring(code):sub(1, 1)) or ("5" == tostring(code):sub(1, 1)) then 350 if ("4" == tostring(code):sub(1, 1)) or ("5" == tostring(code):sub(1, 1)) then
351 E(" " .. code .. " " .. cstr .. ". " .. check .. " " .. host .. " -> " .. URL, PU.scheme, "", host) 351 E(" " .. code .. " " .. cstr .. ". " .. check .. " " .. host .. " -> " .. URL, PU.scheme, "", host)
352 else 352 else