VanGans

ceker aple

Oct 9th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.99 KB | None | 0 0
  1. #!/bin/bash
  2. # Slackerc0de Family Present
  3. # Apple Valid Checker 2018
  4. # 17 December 2K17
  5. # By Malhadi Jr.
  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. printf "$NC\n"
  15. cat <<EOF
  16.        
  17. ---------------------------------------------------
  18.    Apple Valid - VanGans
  19. ---------------------------------------------------
  20.  
  21. EOF
  22.  
  23. usage() {
  24.   echo "Usage: ./myscript.sh COMMANDS: [-i <list.txt>] [-r <folder/>] [-l {1-1000}] [-t {1-10}] OPTIONS: [-d] [-c]
  25.  
  26. Command:
  27. -i (20k-US.txt)     File input that contain email to check
  28. -r (result/)        Folder to store the result live.txt and die.txt
  29. -l (60|90|999999999)      How many list you want to send per delayTime
  30. -t (999999999|5|8)          Sleep for -t when check is reach -l fold
  31.  
  32. Options:
  33. -d                  Delete the list from input file per check
  34. -c                  Compress result to compressed/ folder and
  35.                    move result folder to haschecked/
  36. -h                  Show this manual to screen
  37. -u                  Check integrity file then update
  38.  
  39. Report any bugs to: <Malhadi Jr> [email protected]
  40. "
  41.   exit 1
  42. }
  43.  
  44. while getopts ":i:r:l:t:dchu" o; do
  45.     case "${o}" in
  46.         i)
  47.             inputFile=${OPTARG}
  48.             ;;
  49.         r)
  50.             targetFolder=${OPTARG}
  51.             ;;
  52.         l)
  53.             sendList=${OPTARG}
  54.             ;;
  55.         t)
  56.             perSec=${OPTARG}
  57.             ;;
  58.         d)
  59.             isDel='y'
  60.             ;;
  61.         c)
  62.             isCompress='y'
  63.             ;;
  64.         h)
  65.             usage
  66.             ;;
  67.     esac
  68. done
  69.  
  70. # Do automatic update
  71. # before passing arguments
  72. echo "[+] Doing an automatic update from server slackerc0de.us on `date`"
  73.  
  74. if [[ $inputFile == '' || $targetFolder == '' || $sendList == '' || $perSec == '' ]]; then
  75.   cli_mode="interactive"
  76. else
  77.   cli_mode="interpreter"
  78. fi
  79.  
  80. # Assign false value boolean
  81. # to both options when its null
  82. if [ -z "${isDel}" ]; then
  83.   isDel='n'
  84. fi
  85.  
  86. if [ -z "${isCompress}" ]; then
  87.   isCompress='n'
  88. fi
  89.  
  90. SECONDS=0
  91.  
  92. # Asking user whenever the
  93. # parameter is blank or null
  94. if [[ $inputFile == '' ]]; then
  95.   # Print available file on
  96.  # current folder
  97.  # clear
  98.  tree
  99.   read -p "Enter mailist file: " inputFile
  100. fi
  101.  
  102. if [[ $targetFolder == '' ]]; then
  103.   read -p "Enter target folder: " targetFolder
  104.   # Check if result folder exists
  105.  # then create if it didn't
  106.  if [[ ! -d "$targetFolder" ]]; then
  107.     echo "[+] Creating $targetFolder/ folder"
  108.     mkdir $targetFolder
  109.   else
  110.     read -p "$targetFolder/ folder are exists, append to them ? [y/n]: " isAppend
  111.     if [[ $isAppend == 'n' ]]; then
  112.       exit
  113.     fi
  114.   fi
  115. else
  116.   if [[ ! -d "$targetFolder" ]]; then
  117.     echo "[+] Creating $targetFolder/ folder"
  118.     mkdir $targetFolder
  119.   fi
  120. fi
  121.  
  122. if [[ $isDel == '' || $cli_mode == 'interactive' ]]; then
  123.   read -p "Delete list per check ? [y/n]: " isDel
  124. fi
  125.  
  126. if [[ $isCompress == '' || $cli_mode == 'interactive' ]]; then
  127.   read -p "Compress the result ? [y/n]: " isCompress
  128. fi
  129.  
  130. if [[ $sendList == '' ]]; then
  131.   read -p "How many list send: " sendList
  132. fi
  133.  
  134. if [[ $perSec == '' ]]; then
  135.   read -p "Delay time: " perSec
  136. fi
  137.  
  138. malhadi_appleval() {
  139.   SECONDS=0
  140.  
  141.   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`
  142.   duration=$SECONDS
  143.   header="`date +%H:%M:%S` from $inputFile to $targetFolder"
  144.   footer="[VanGans Private Checker] $(($duration % 60))sec.\n"
  145.   val="$(echo "$check" | grep -c 'used" : true')"
  146.  inv="$(echo "$check" | grep -c 'used" : false')"
  147.   bad="$(echo "$check" | grep -c 'valid" : false')"
  148.  icl="$(echo "$check" | grep -c 'appleOwnedDomain" : true')"
  149.  
  150.   if [[ $val > 0 || $icl > 0 ]]; then
  151.     printf "[$header] $2/$3. ${ORANGE}LIVE => $1 ${NC} $footer"
  152.     echo "LIVE => $1" >> $4/live.txt
  153.   else
  154.     if [[ $inv > 0 || $bad > 0 ]]; then
  155.       printf "[$header] $2/$3. ${RED}DIE => $1 ${NC} $footer"
  156.       echo "DIE => $1" >> $4/die.txt
  157.     else
  158.       printf "[$header] $2/$3. ${CYAN}UNKNOWN => $1 ${NC} $footer"
  159.       echo "$1 => $check" >> reason.txt
  160.       echo "UNKNOWN => $1" >> $inputFile
  161.     fi
  162.   fi
  163.  
  164.   printf "\r"
  165. }
  166.  
  167. if [[ ! -f $inputFile ]]; then
  168.   echo "[404] File mailist not found. Check your mailist file name."
  169.   ls -l
  170.   exit
  171. fi
  172.  
  173. # Preparing file list
  174. # by using email pattern
  175. # every line in $inputFile
  176. echo "[+] Cleaning your mailist file"
  177. grep -Eiorh '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' $inputFile | tr '[:upper:]' '[:lower:]' | sort | uniq > temp_list && mv temp_list $inputFile
  178.  
  179. # Finding match mail provider
  180. echo "########################################"
  181. # Print total line of mailist
  182. totalLines=`grep -c "@" $inputFile`
  183. echo "There are $totalLines of list."
  184. echo " "
  185. echo "Hotmail: `grep -c "@hotmail" $inputFile`"
  186. echo "Yahoo: `grep -c "@yahoo" $inputFile`"
  187. echo "Gmail: `grep -c "@gmail" $inputFile`"
  188. echo "########################################"
  189.  
  190. # Extract email per line
  191. # from both input file
  192. IFS=$'\r\n' GLOBIGNORE='*' command eval  'mailist=($(cat $inputFile))'
  193. con=1
  194.  
  195. getKey() {
  196.   echo "Generating token now. Please wait..."
  197.   wait
  198.   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`
  199.   scnt="$(echo "$resp" | grep "scnt: " | cut -c7- | xargs)"
  200.   sessionId="$(echo "$resp" | grep "aidsp" | awk -F[=\;] '{print $2}' | xargs)"
  201.   apiKey='cbf64fd6843ee630b463f358ea0b707b'
  202.  
  203.   # echo "$resp"
  204.  # echo "SCNT: $scnt"
  205.  # echo "SESSIONID: $sessionId"
  206.  
  207.   if [[ $scnt == '' || $sessionId == '' || $apiKey = '' ]]; then
  208.     sleep 4
  209.     echo "Something wrong. Regenerate token now. Please wait..."
  210.     getKey
  211.     sleep 2
  212.   fi
  213. }
  214.  
  215. getKey
  216.  
  217. echo "[+] Sending $sendList email per $perSec seconds"
  218.  
  219. for (( i = 0; i < "${#mailist[@]}"; i++ )); do
  220.   username="${mailist[$i]}"
  221.   indexer=$((con++))
  222.   tot=$((totalLines--))
  223.   fold=`expr $i % $sendList`
  224.   if [[ $fold == 0 && $i > 0 ]]; then
  225.     header="`date +%H:%M:%S`"
  226.     duration=$SECONDS
  227.     echo "[$header] Waiting $perSec second. $(($duration / 3600)) hours $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed, With $sendList req / $perSec seconds."
  228.     sleep $perSec
  229.   fi
  230.   vander=`expr $i % 8`
  231.   if [[ $vander == 0 && $i > 0 ]]; then
  232.     getKey
  233.   fi
  234.  
  235.   malhadi_appleval "$username" "$indexer" "$tot" "$targetFolder" "$inputFile" &
  236.  
  237.   if [[ $isDel == 'y' ]]; then
  238.     grep -v -- "$username" $inputFile > "$inputFile"_temp && mv "$inputFile"_temp $inputFile
  239.   fi
  240. done
  241.  
  242. # waiting the background process to be done
  243. # then checking list from garbage collector
  244. # located on $targetFolder/unknown.txt
  245. echo "[+] Waiting background process to be done"
  246. wait
  247. wc -l $targetFolder/*
  248.  
  249. if [[ $isCompress == 'y' ]]; then
  250.   tgl=`date`
  251.   tgl=${tgl// /-}
  252.   zipped="$targetFolder-$tgl.zip"
  253.  
  254.   echo "[+] Compressing result"
  255.   zip -r "compressed/$zipped" "$targetFolder/die.txt" "$targetFolder/live.txt"
  256.   echo "[+] Saved to compressed/$zipped"
  257.   mv $targetFolder haschecked
  258.   echo "[+] $targetFolder has been moved to haschecked/"
  259. fi
  260. #rm $inputFile
  261. duration=$SECONDS
  262. echo "$(($duration / 3600)) hours $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
  263. echo "+==========+ Applevalid VanGans +==========+"
Add Comment
Please, Sign In to add comment