Advertisement
IssouLinux

check_ban_pseudo_jvc.sh

Nov 26th, 2023 (edited)
641
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. #!/bin/bash
  2. #Auteur: IssouLinux
  3.  
  4. # /!\ Ne permet pas de savoir si un pseudo est ban tempo ou def /!\
  5.  
  6. check_banni() {
  7.   read -p "Entre les pseudos que tu veux vérifier (séparés par des virgules): " user_input
  8.  
  9.   # Split the input string by comma and convert into an array
  10.   IFS=',' read -ra pseudos <<< "$user_input"
  11.  
  12.   for pseudo in "${pseudos[@]}"; do
  13.     # Convert to lowercase
  14.     local lowercase_pseudo="${pseudo,,}"
  15.  
  16.     # Use curl with user-agent to simulate a browser request
  17.     local response=$(curl -sA "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" "https://www.jeuxvideo.com/profil/${lowercase_pseudo}?mode=infos")
  18.  
  19.     if [[ $response == *"banni"* ]]; then
  20.       # Pseudo is banned
  21.       echo "${lowercase_pseudo}: ❌ Banni"
  22.     else
  23.       # Pseudo is not banned
  24.       echo "${lowercase_pseudo}: ✅ Non Banni"
  25.     fi
  26.   done
  27. }
  28.  
  29. # Appelle la fonction
  30. check_banni
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement