Skip to content

Commit 96a4eb9

Browse files
committed
Fix Accept Header (3.0)
see #2325. This is for the 3.0 branch (for 3.1dev see #2326) "whenever HTTP/1.1 is used then the Accept header uses "text/*" as a MIME type. This causes some minor issues with some of the checks we are doing"
1 parent 52fe210 commit 96a4eb9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

testssl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14808,7 +14808,7 @@ run_breach() {
1480814808
[[ "$NODE" =~ google ]] && referer="https://yandex.ru/" # otherwise we have a false positive for google.com
1480914809
useragent="$UA_STD"
1481014810
$SNEAKY && useragent="$UA_SNEAKY"
14811-
printf "GET $url HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $useragent\r\nReferer: $referer\r\nConnection: Close\r\nAccept-encoding: gzip,deflate,compress,br\r\nAccept: text/*\r\n\r\n" | $OPENSSL s_client $(s_client_options "$OPTIMAL_PROTO $BUGS -quiet -ign_eof -connect $NODEIP:$PORT $PROXY $SNI") 1>$TMPFILE 2>$ERRFILE &
14811+
printf "GET $url HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $useragent\r\nReferer: $referer\r\nConnection: Close\r\nAccept-encoding: gzip,deflate,compress,br\r\nAccept: */*\r\n\r\n" | $OPENSSL s_client $(s_client_options "$OPTIMAL_PROTO $BUGS -quiet -ign_eof -connect $NODEIP:$PORT $PROXY $SNI") 1>$TMPFILE 2>$ERRFILE &
1481214812
wait_kill $! $HEADER_MAXSLEEP
1481314813
was_killed=$? # !=0 was killed
1481414814
result="$(grep -ia Content-Encoding: $TMPFILE)"
@@ -18762,7 +18762,7 @@ determine_service() {
1876218762
if [[ -n "$BASICAUTH" ]]; then
1876318763
basicauth_header="Authorization: Basic $(safe_echo "$BASICAUTH" | $OPENSSL base64 2>/dev/null)\r\n"
1876418764
fi
18765-
GET_REQ11="GET $URL_PATH HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $ua\r\n${basicauth_header}Accept-Encoding: identity\r\nAccept: text/*\r\nConnection: Close\r\n\r\n"
18765+
GET_REQ11="GET $URL_PATH HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $ua\r\n${basicauth_header}Accept-Encoding: identity\r\nAccept: */*\r\nConnection: Close\r\n\r\n"
1876618766
# returns always 0:
1876718767
service_detection $OPTIMAL_PROTO
1876818768
else # STARTTLS

0 commit comments

Comments
 (0)