mirror of
				https://github.com/byReqz/conn.git
				synced 2025-11-04 05:11:31 +00:00 
			
		
		
		
	improved ipv6 detection
This commit is contained in:
		
							
								
								
									
										3
									
								
								conn.sh
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								conn.sh
									
									
									
									
									
								
							@@ -55,7 +55,8 @@ while [ ! -z "$1" ]; do
 | 
			
		||||
      fping -6 -c 4 -A $2
 | 
			
		||||
      echo "------------------------------------------------"
 | 
			
		||||
      exit
 | 
			
		||||
   elif [[ ! "$1" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]];then
 | 
			
		||||
   #this checks if the ip is (not) ipv4 and then checks if it includes a :
 | 
			
		||||
   elif [[ ! "$1" =~ [0-9]{1,3}(\.[0-9]{1,3}){3} ]] && [[ "$1" =~ [:] ]];then
 | 
			
		||||
      echo "noticed IPv6 adress -> using -6"
 | 
			
		||||
      echo "checking connection status for $1"
 | 
			
		||||
      echo "-------------------Availability----------------------"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user