diff options
| author | onefang | 2019-11-23 21:51:44 +1000 |
|---|---|---|
| committer | onefang | 2019-11-23 21:51:44 +1000 |
| commit | 5242caf8cb467563701c0fe5d5d84320a1a0fbe4 (patch) | |
| tree | 92426ce621ba8fb0262387644f24684868eaeacf | |
| parent | Add a warning about large error / warning counts. (diff) | |
| download | apt-panopticon-5242caf8cb467563701c0fe5d5d84320a1a0fbe4.zip apt-panopticon-5242caf8cb467563701c0fe5d5d84320a1a0fbe4.tar.gz apt-panopticon-5242caf8cb467563701c0fe5d5d84320a1a0fbe4.tar.bz2 apt-panopticon-5242caf8cb467563701c0fe5d5d84320a1a0fbe4.tar.xz | |
Use --connect-to properly.
| -rwxr-xr-x | apt-panopticon.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 71d3629..a7d67d2 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
| @@ -327,7 +327,7 @@ checkHEAD = function (host, URL, r, retry) | |||
| 327 | 327 | ||
| 328 | --[[ Using curl command line - | 328 | --[[ Using curl command line - |
| 329 | -I - HEAD | 329 | -I - HEAD |
| 330 | --connect-to IP - connect to IP, but use SNI from URL. | 330 | --connect-to domain:port:IP:port - connect to IP, but use SNI from URL. |
| 331 | -header "" - add extra headers. | 331 | -header "" - add extra headers. |
| 332 | -L - DO follow redirects. | 332 | -L - DO follow redirects. |
| 333 | --max-redirs n - set maximum redirects, default is 50, -1 = unlimited. | 333 | --max-redirs n - set maximum redirects, default is 50, -1 = unlimited. |
| @@ -346,7 +346,7 @@ checkHEAD = function (host, URL, r, retry) | |||
| 346 | if "http" == PU.scheme then | 346 | if "http" == PU.scheme then |
| 347 | hdr = '-H "Host: ' .. host .. '"' | 347 | hdr = '-H "Host: ' .. host .. '"' |
| 348 | end | 348 | end |
| 349 | IP = '--connect-to ' .. PU.host | 349 | IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' |
| 350 | end | 350 | end |
| 351 | local cmd = 'curl -I --retry 0 -s --path-as-is --connect-timeout 15 --max-redirs 0 ' .. IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. | 351 | local cmd = 'curl -I --retry 0 -s --path-as-is --connect-timeout 15 --max-redirs 0 ' .. IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. |
| 352 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' | 352 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' |
