mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-11-03 23:35:26 +01:00 
			
		
		
		
	Fix switch --ids-friendly
This switch had no effect. There was probably a regression problem as it worked before. Besides fixing that the large case statement in parse_cmd_line() was simplified, in a sense that banner and help functions were moved to a separate case statement.
This commit is contained in:
		
							
								
								
									
										19
									
								
								testssl.sh
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								testssl.sh
									
									
									
									
									
								
							@@ -19364,14 +19364,8 @@ parse_cmd_line() {
 | 
			
		||||
     CMDLINE="$(create_cmd_line_string "${CMDLINE_ARRAY[@]}")"
 | 
			
		||||
     CMDLINE_PARSED=false
 | 
			
		||||
 | 
			
		||||
     # Show usage if no options were specified
 | 
			
		||||
     [[ -z "$1" ]] && help 0
 | 
			
		||||
     # Set defaults if only an URI was specified, maybe ToDo: use "="-option, then: ${i#*=} i.e. substring removal
 | 
			
		||||
     [[ "$#" -eq 1 ]] && set_scanning_defaults
 | 
			
		||||
 | 
			
		||||
     while [[ $# -gt 0 ]]; do
 | 
			
		||||
     case $1 in
 | 
			
		||||
               --help)
 | 
			
		||||
          --help|"")
 | 
			
		||||
               help 0
 | 
			
		||||
               ;;
 | 
			
		||||
          -b|--banner|-v|--version)
 | 
			
		||||
@@ -19382,6 +19376,13 @@ parse_cmd_line() {
 | 
			
		||||
               mybanner
 | 
			
		||||
               exit $ALLOK
 | 
			
		||||
               ;;
 | 
			
		||||
     esac
 | 
			
		||||
 | 
			
		||||
     # initializing
 | 
			
		||||
     set_scanning_defaults
 | 
			
		||||
 | 
			
		||||
     while [[ $# -gt 0 ]]; do
 | 
			
		||||
          case $1 in
 | 
			
		||||
               --mx)
 | 
			
		||||
                    do_mx_all_ips=true
 | 
			
		||||
                    PORT=25
 | 
			
		||||
@@ -19883,8 +19884,8 @@ parse_cmd_line() {
 | 
			
		||||
     done
 | 
			
		||||
 | 
			
		||||
     [[ "$DEBUG" -ge 5 ]] && debug_globals
 | 
			
		||||
     # if we have no "do_*" set here --> query_globals: we do a standard run -- otherwise just the one specified
 | 
			
		||||
     query_globals && set_scanning_defaults
 | 
			
		||||
     set_scanning_defaults
 | 
			
		||||
     query_globals
 | 
			
		||||
     CMDLINE_PARSED=true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user