|
7 | 7 |
|
8 | 8 | set -x |
9 | 9 |
|
10 | | -ua='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' |
11 | | -accept_hdr='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' |
12 | | -url='https://wiki.mozilla.org/Abstract_Interpretation' |
| 10 | +ua="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" |
| 11 | +accept_hdr="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" |
| 12 | +lang_hdr="en-US,en;q=0.9" |
| 13 | +enc_hdr="gzip, deflate, br" |
| 14 | +cache_hdr="no-cache" |
| 15 | +conn_hdr="keep-alive" |
13 | 16 |
|
14 | | -curl -s -o /dev/null -w '%{http_code}\n' -L "$url" |
| 17 | +url="https://wiki.mozilla.org/Abstract_Interpretation" |
15 | 18 |
|
16 | | -curl -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" "$url" |
| 19 | +curl -s -o /dev/null -w '%{http_code}\n' \ |
| 20 | + -I \ |
| 21 | + -A "$ua" \ |
| 22 | + -H "Accept: $accept_hdr" \ |
| 23 | + -H "Accept-Language: $lang_hdr" \ |
| 24 | + -H "Accept-Encoding: $enc_hdr" \ |
| 25 | + -H "Connection: $conn_hdr" \ |
| 26 | + -H "Cache-Control: $cache_hdr" \ |
| 27 | + "$url" |
17 | 28 |
|
18 | | -curl -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" -H "Accept: $accept_hdr" "$url" |
| 29 | +curl -s -o /dev/null -w '%{http_code}\n' \ |
| 30 | + --range 0-0 \ |
| 31 | + -A "$ua" \ |
| 32 | + -H "Accept: $accept_hdr" \ |
| 33 | + -H "Accept-Language: $lang_hdr" \ |
| 34 | + -H "Accept-Encoding: $enc_hdr" \ |
| 35 | + -H "Connection: $conn_hdr" \ |
| 36 | + -H "Cache-Control: $cache_hdr" \ |
| 37 | + "$url" |
19 | 38 |
|
20 | | -curl -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" -H "Referer: https://$(echo $url | awk -F/ '{print $3}')/" "$url" |
| 39 | +wget --spider --server-response --user-agent="$ua" "$url" 2>&1 \ |
| 40 | + | awk '/^ HTTP\// { print $2 }' |
21 | 41 |
|
22 | | -curl -4 -s -o /dev/null -w '%{http_code}\n' -L -A "$ua" "$url" |
| 42 | +wget --spider --server-response --user-agent="$ua" --method=GET "$url" 2>&1 \ |
| 43 | + | awk '/^ HTTP\// { print $2 }' |
| 44 | + |
| 45 | +curl -s -o /dev/null -w '%{http_code}\n' \ |
| 46 | + --http1.1 \ |
| 47 | + -I \ |
| 48 | + -A "$ua" \ |
| 49 | + -H "Accept: $accept_hdr" \ |
| 50 | + -H "Accept-Language: $lang_hdr" \ |
| 51 | + -H "Accept-Encoding: $enc_hdr" \ |
| 52 | + -H "Connection: $conn_hdr" \ |
| 53 | + -H "Cache-Control: $cache_hdr" \ |
| 54 | + "$url" |
23 | 55 |
|
24 | 56 | set -euo pipefail |
25 | 57 |
|
|
0 commit comments