mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-11-03 23:35:26 +01:00 
			
		
		
		
	More polishing of http basic auth
* Replace "! -z" with "-n" * Replace "openssl' with "$OPENSSL" * Redirect stderr output of $OPENSSL to /dev/null to supress "WARNING: can't open config file: /usr/local/etc/ssl/openssl.cnf" message (see #833) * Remove unnecessary spaces from $GET_REQ11 string.
This commit is contained in:
		@@ -18419,10 +18419,10 @@ determine_service() {
 | 
				
			|||||||
          $SNEAKY && \
 | 
					          $SNEAKY && \
 | 
				
			||||||
               ua="$UA_SNEAKY" || \
 | 
					               ua="$UA_SNEAKY" || \
 | 
				
			||||||
               ua="$UA_STD"
 | 
					               ua="$UA_STD"
 | 
				
			||||||
          if [[ ! -z "$BASICAUTH" ]]; then
 | 
					          if [[ -n "$BASICAUTH" ]]; then
 | 
				
			||||||
               basicauth_header="Authorization: Basic $(openssl base64 <<< $BASICAUTH) \r\n"
 | 
					               basicauth_header="Authorization: Basic $($OPENSSL base64 <<< "$BASICAUTH" 2>/dev/null)\r\n"
 | 
				
			||||||
          fi
 | 
					          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:
 | 
					          # returns always 0:
 | 
				
			||||||
          service_detection $OPTIMAL_PROTO
 | 
					          service_detection $OPTIMAL_PROTO
 | 
				
			||||||
     else # STARTTLS
 | 
					     else # STARTTLS
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user