mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
Merge pull request #1454 from dcooper16/basic_auth_polishing
More polishing of http basic auth
This commit is contained in:
commit
c2060c08f3
@ -18419,10 +18419,10 @@ determine_service() {
|
||||
$SNEAKY && \
|
||||
ua="$UA_SNEAKY" || \
|
||||
ua="$UA_STD"
|
||||
if [[ ! -z "$BASICAUTH" ]]; then
|
||||
basicauth_header="Authorization: Basic $(openssl base64 <<< $BASICAUTH) \r\n"
|
||||
if [[ -n "$BASICAUTH" ]]; then
|
||||
basicauth_header="Authorization: Basic $($OPENSSL base64 <<< "$BASICAUTH" 2>/dev/null)\r\n"
|
||||
fi
|
||||
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"
|
||||
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"
|
||||
# returns always 0:
|
||||
service_detection $OPTIMAL_PROTO
|
||||
else # STARTTLS
|
||||
|
Loading…
Reference in New Issue
Block a user