mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
fix problem with servers which return gzip encoded body
Some servers like the one from the satire magazine "focus.de" choose to return gzip encoded body during run_http_haders(). This has led sometimes to misintepretation that an IPv4 address is present in the header. This commit fixes that by telling the server not to want a gzipped response and if still returned grep properly the return.
This commit is contained in:
parent
47409a32d6
commit
0896c901db
@ -1603,7 +1603,7 @@ detect_ipv4() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# white list some headers as they are mistakenly identified as ipv4 address. Issues 158, 323,o facebook has a CSP rule for 127.0.0.1
|
# white list some headers as they are mistakenly identified as ipv4 address. Issues 158, 323,o facebook has a CSP rule for 127.0.0.1
|
||||||
if egrep -vi "$whitelisted_header" $HEADERFILE | grep -iqE "$ipv4address"; then
|
if egrep -vai "$whitelisted_header" $HEADERFILE | grep -iqE "$ipv4address"; then
|
||||||
pr_bold " IPv4 address in header "
|
pr_bold " IPv4 address in header "
|
||||||
count=0
|
count=0
|
||||||
while read line; do
|
while read line; do
|
||||||
@ -13792,10 +13792,7 @@ determine_service() {
|
|||||||
$SNEAKY && \
|
$SNEAKY && \
|
||||||
ua="$UA_SNEAKY" || \
|
ua="$UA_SNEAKY" || \
|
||||||
ua="$UA_STD"
|
ua="$UA_STD"
|
||||||
GET_REQ11="GET $URL_PATH HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $ua\r\nConnection: Close\r\nAccept: text/*\r\n\r\n"
|
GET_REQ11="GET $URL_PATH HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $ua\r\nAccept-Encoding: identity\r\nAccept: text/*\r\nConnection: Close\r\n\r\n"
|
||||||
# HEAD_REQ11="HEAD $URL_PATH HTTP/1.1\r\nHost: $NODE\r\nUser-Agent: $ua\r\nAccept: text/*\r\n\r\n"
|
|
||||||
# GET_REQ10="GET $URL_PATH HTTP/1.0\r\nUser-Agent: $ua\r\nConnection: Close\r\nAccept: text/*\r\n\r\n"
|
|
||||||
# HEAD_REQ10="HEAD $URL_PATH HTTP/1.0\r\nUser-Agent: $ua\r\nAccept: text/*\r\n\r\n"
|
|
||||||
service_detection $OPTIMAL_PROTO
|
service_detection $OPTIMAL_PROTO
|
||||||
else # STARTTLS
|
else # STARTTLS
|
||||||
if [[ "$1" == postgres ]]; then
|
if [[ "$1" == postgres ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user