#!/bin/bash grep "^telnet:" /var/www/sites/hacking/links.txt \ | cat -n printf "Which do you want to connect to?\nnumber: " read N export N=$(printf "%s" "$N" | sed "s/[^0-9]//g") serverURL=$(grep "^telnet:" /var/www/sites/hacking/links.txt \ | cut '-d ' -f1 \ | head -n${N} \ | tail -n1) echo "You've selected: $serverURL (#$N)" printf "connecting in...\n" for i in `seq 5 1`;do printf "\r%d..." $i sleep 1 done port=$(printf "%s" "$serverURL" | cuturl | grep ^port | cut '-d ' -f2) exec ncat -i 600 $(printf "%s" "$serverURL" \ | cuturl \ | grep ^domain \ | cut '-d ' -f2 ) $port