mirror of
				https://github.com/byReqz/conn.git
				synced 2025-11-04 05:11:31 +00:00 
			
		
		
		
	add fast mode
This commit is contained in:
		
							
								
								
									
										16
									
								
								conn.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								conn.sh
									
									
									
									
									
								
							@@ -19,6 +19,8 @@ fi
 | 
				
			|||||||
         echo " -p/--portscan -- same as -y"
 | 
					         echo " -p/--portscan -- same as -y"
 | 
				
			||||||
         echo " -w/--wait -- wait for active connection"
 | 
					         echo " -w/--wait -- wait for active connection"
 | 
				
			||||||
         echo " -u/--update -- update the script to the newest version"
 | 
					         echo " -u/--update -- update the script to the newest version"
 | 
				
			||||||
 | 
					         echo " -f/ --fast -- disable os check"
 | 
				
			||||||
 | 
					         echo " -s/ --simple -- same as -f"
 | 
				
			||||||
         exit
 | 
					         exit
 | 
				
			||||||
   done
 | 
					   done
 | 
				
			||||||
   while [ ! -z "$1" ]; do
 | 
					   while [ ! -z "$1" ]; do
 | 
				
			||||||
@@ -34,6 +36,8 @@ fi
 | 
				
			|||||||
         echo " -p/--portscan -- same as -y"
 | 
					         echo " -p/--portscan -- same as -y"
 | 
				
			||||||
         echo " -w/--wait -- wait for active connection"
 | 
					         echo " -w/--wait -- wait for active connection"
 | 
				
			||||||
         echo " -u/--update -- update the script to the newest version"
 | 
					         echo " -u/--update -- update the script to the newest version"
 | 
				
			||||||
 | 
					         echo " -f/ --fast -- disable os check"
 | 
				
			||||||
 | 
					         echo " -s/ --simple -- same as -f"
 | 
				
			||||||
         exit
 | 
					         exit
 | 
				
			||||||
      elif [[ $1 == "-m" ]] || [[ "$1" == "--multi" ]];then
 | 
					      elif [[ $1 == "-m" ]] || [[ "$1" == "--multi" ]];then
 | 
				
			||||||
         echo "multi-ip mode, portscan disabled"
 | 
					         echo "multi-ip mode, portscan disabled"
 | 
				
			||||||
@@ -41,6 +45,18 @@ fi
 | 
				
			|||||||
         fping -e $@
 | 
					         fping -e $@
 | 
				
			||||||
         echo "-----------------------------------------------------"
 | 
					         echo "-----------------------------------------------------"
 | 
				
			||||||
         exit
 | 
					         exit
 | 
				
			||||||
 | 
					      elif [[ $1 == "-f" ]] || [[ "$1" == "--fast" ]] || [[ $1 == "-s" ]] || [[ "$1" == "--simple" ]];then
 | 
				
			||||||
 | 
					         echo "$1 used, skipping os check"
 | 
				
			||||||
 | 
					         echo "checking connection status for $2"
 | 
				
			||||||
 | 
					         echo "-------------------Availability----------------------"
 | 
				
			||||||
 | 
					         fping -e $2
 | 
				
			||||||
 | 
					         echo "-----------------------------------------------------"
 | 
				
			||||||
 | 
					         echo "-------------------Portscan---------------------"
 | 
				
			||||||
 | 
					         nmap --reason -Pn $2
 | 
				
			||||||
 | 
					         echo ""
 | 
				
			||||||
 | 
					         fping -c 4 $2
 | 
				
			||||||
 | 
					         echo "------------------------------------------------"
 | 
				
			||||||
 | 
					         exit
 | 
				
			||||||
      elif [[ $1 == "-y" ]] || [[ $1 == "-p" ]] || [[ "$1" == "--portscan" ]] || [[ "$1" == "--yes" ]];then
 | 
					      elif [[ $1 == "-y" ]] || [[ $1 == "-p" ]] || [[ "$1" == "--portscan" ]] || [[ "$1" == "--yes" ]];then
 | 
				
			||||||
         echo "checking connection status for $2"
 | 
					         echo "checking connection status for $2"
 | 
				
			||||||
         fping=$(fping -a $2)
 | 
					         fping=$(fping -a $2)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user