Script 131

Script de connexion depuis le 131
Ce script a été créé par C4ptainCrunch de manière à accélérer le processus de connexion au magnifique réseau internet de l'ULB mis à notre disposition.

url="http://perdu.com" echo "Checking status..." code=`curl -o /dev/null --silent --head --write-out '%{http_code}\n' $url` if [ "$code" -eq 401 ]; then if [ -z $1 ]; then user=user password=pass else user=user2 password=pass2 fi   echo "Authentification... Sending password for user $user in clear text! Yes, rly." wget -q -O - --user $user --password $password $url > /dev/null echo "Done. Tubes are open, have fun!" elif [ "$code" -eq 200 ]; then echo "Tha internetz was already accessible. You should have fun with ponies instead of using this script!" else echo "Error! HTTP code is not 401 (or 200), wont try. (Code is $code)" fi
 * 1) !/bin/sh

Rapides modifications visuelles :


 * 1) !/bin/sh

GREEN="\\033[1;32m" YELLOW="\\033[1;33m" RED="\\033[1;31m" NORMAL="\\033[0;39m"

url="http://perdu.com" echo " \n "$GREEN" Checking status... "$NORMAL" \n " code=`curl -o /dev/null --silent --head --write-out '%{http_code}\n' $url` if [ "$code" -eq 401 ]; then if [ -z $1 ]; then user=user password=pass else user=user2 password=pass2 fi   echo " "$YELLOW" Authentification... Sending password for user $user in clear text! Yes, rly. "$NORMAL" \n " wget -q -O - --user $user --password $password $url > /dev/null echo " "$GREEN" =============================== "$NORMAL" " echo " "$GREEN" Done. Tubes are open, have fun! "$NORMAL" " echo " "$GREEN" =============================== "$NORMAL" \n " elif [ "$code" -eq 200 ]; then echo " "$GREEN" Tha internetz was already accessible. You should have fun with ponies instead of using this script! "$NORMAL" \n " else echo " "$RED" ============================================================= "$NORMAL" " echo " "$RED" Error! HTTP code is not 401 (or 200), wont try. (Code is $code) "$NORMAL" " echo " "$RED" ============================================================= "$NORMAL" \n " fi