Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
5,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. #!/bin/bash
  2. # team bubadibako
  3. # Apple Valid Checker 2019
  4. # 7 january 2019
  5. # By Bubadibako team
  6.  
  7. RED='\033[0;31m'
  8. CYAN='\033[0;36m'
  9. YELLOW='\033[1;33m'
  10. ORANGE='\033[0;33m'
  11. PUR='\033[0;35m'
  12. GRN="\e[32m"
  13. WHI="\e[37m"
  14. NC='\033[0m'
  15. echo ""
  16. printf " $RED||| ||| $RED|||||||||\n"
  17. printf " $RED||| ||| $RED||| |||\n"
  18. printf " $RED||| ||| $RED||| |||\n"
  19. printf " $RED |||||||| $RED|||||||||\n"
  20. printf " $WHI ||| $WHI|||\n"
  21. printf " $WHI||| ||| $WHI|||\n"
  22. printf " $WHI ||||||| $WHI|||\n"
  23. cat <<EOF
  24.  
  25. [+] TEAM - BUBADIBAKO [+]
  26. [+] BERBUAT BAIK DIBALAS KONTOL [+]
  27.  
  28. ===========================================
  29. [+]=> Apple Validator <=[+]
  30. [+] Happy Checker [+]
  31. [+] And Happy New Years [+]
  32. ===========================================
  33.  
  34. EOF
  35.  
  36. usage() {
  37. echo "Usage: ./myscript.sh COMMANDS: [-i <list.txt>] [-r <folder/>] [-l {1-1000}] [-t {1-10}] OPTIONS: [-d] [-c]
  38.  
  39. Command:
  40. -i (20k-US.txt) File input that contain email to check
  41. -r (result/) Folder to store the result live.txt and die.txt
  42. -l (60|90|110) How many list you want to send per delayTime
  43. -t (3|5|8) Sleep for -t when check is reach -l fold
  44.  
  45. Options:
  46. -d Delete the list from input file per check
  47. -c Compress result to compressed/ folder and
  48. move result folder to haschecked/
  49. -h Show this manual to screen
  50. -u Check integrity file then update
  51.  
  52. Report any bugs to: KRISNADWI286@GMAIL.COM
  53. "
  54. exit 1
  55. }
  56.  
  57. # Assign the arguments for each
  58. # parameter to global variable
  59. while getopts ":i:r:l:t:dchu" o; do
  60. case "${o}" in
  61. i)
  62. inputFile=${OPTARG}
  63. ;;
  64. r)
  65. targetFolder=${OPTARG}
  66. ;;
  67. l)
  68. sendList=${OPTARG}
  69. ;;
  70. t)
  71. perSec=${OPTARG}
  72. ;;
  73. d)
  74. isDel='yes'
  75. ;;
  76. c)
  77. isCompress='yes'
  78. ;;
  79. h)
  80. usage
  81. ;;
  82. u)
  83. updater "manual"
  84. ;;
  85. esac
  86. done
  87.  
  88. # Do automatic update
  89. # before passing arguments
  90. echo "[+] Checker Apple Validator 2019[+]"
  91.  
  92.  
  93. if [[ $inputFile == '' || $targetFolder == '' || $sendempas == '' || $perSec == '' ]]; then
  94. cli_mode="interactive"
  95. else
  96. cli_mode="interpreter"
  97. fi
  98.  
  99. # Assign false value boolean
  100. # to both options when its null
  101. if [ -z "${isDel}" ]; then
  102. isDel='no'
  103. fi
  104.  
  105. if [ -z "${isCompress}" ]; then
  106. isCompress='no'
  107. fi
  108.  
  109. SECONDS=0
  110.  
  111. # Asking user whenever the
  112. # parameter is blank or null
  113. if [[ $inputFile == '' ]]; then
  114. # Print available file on
  115. # current folder
  116. # clear
  117.  
  118. read -p "[+]masukkan maillist[+] : " inputFile
  119. fi
  120.  
  121. if [[ $targetFolder == '' ]]; then
  122. read -p "[+]membuat folder list[+] : " targetFolder
  123. # Check if result folder exists
  124. # then create if it didn't
  125. if [[ ! -d "$targetFolder" ]]; then
  126. echo "[+] Creating $targetFolder/ folder"
  127. mkdir $targetFolder
  128. else
  129. read -p "$targetFolder/ Folder sudah tersedia, gabungkan dengan folder tersebut? [yes/no]: " isAppend
  130. if [[ $isAppend == 'no' ]]; then
  131. exit
  132. fi
  133. fi
  134. else
  135. if [[ ! -d "$targetFolder" ]]; then
  136. echo "[+] Creating $targetFolder/ folder"
  137. mkdir $targetFolder
  138. fi
  139. fi
  140.  
  141. if [[ $isDel == '' || $cli_mode == 'interactive' ]]; then
  142. read -p "[+]Delete list per check ? [yes/no][+] : " isDel
  143. fi
  144.  
  145. if [[ $isCompress == '' || $cli_mode == 'interactive' ]]; then
  146. read -p "[+]gabungkan list ? [yes/no][+] : " isCompress
  147. fi
  148.  
  149. if [[ $sendList == '' ]]; then
  150. read -p "[+]masukkan jumlah list yang di check[+] : " sendList
  151. fi
  152.  
  153. if [[ $perSec == '' ]]; then
  154. read -p "[+]Delay time[+] : " perSec
  155. fi
  156.  
  157. nagahitam_apple_validator() {
  158. SECONDS=0
  159.  
  160. 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`
  161. duration=$SECONDS
  162. header="BUAT-BAIK"
  163. footer="[ DIBALAS-KONTOL ]\n"
  164. val="$(echo "$check" | grep -c 'used" : true')"
  165. inv="$(echo "$check" | grep -c 'used" : false')"
  166. bad="$(echo "$check" | grep -c 'valid" : false')"
  167. icl="$(echo "$check" | grep -c 'appleOwnedDomain" : true')"
  168.  
  169. if [[ $val > 0 || $icl > 0 ]]; then
  170. printf "[$header] $2/$3. ${GRN}LIVE -> $1 ${CYAN} $footer"
  171. echo "LIVE => $1" >> $4/live.txt
  172. else
  173. if [[ $inv > 0 || $bad > 0 ]]; then
  174. printf "[$header] $2/$3. ${RED}DIE -> $1 ${CYAN} $footer"f
  175. echo "DIE => $1" >> $4/die.txt
  176. else
  177. printf "[$header] $2/$3. ${PUR}UNKNOWN -> $1 ${CYAN} $footer"
  178. echo "$1 => $check" >> reason.txt
  179. echo "UNKNOWN => $1" >> $inputFile
  180. fi
  181. fi
  182.  
  183. printf "\r"
  184. }
  185.  
  186. if [[ ! -f $inputFile ]]; then
  187. echo "[404] [+]File Mailist Tidak ada. Check Kembali Nama File Mailist anda.[+]"
  188. ls -l
  189. exit
  190. fi
  191.  
  192. # Preparing file list
  193. # by using email pattern
  194. # every line in $inputFile
  195. echo "[+] Membersihkan file mailist Anda[+]"
  196. grep -Eiorh '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' $inputFile | tr '[:upper:]' '[:lower:]' | sort | uniq > temp_list && mv temp_list $inputFile
  197.  
  198. # Finding match mail provider
  199. echo "========================================="
  200. # Print total line of mailist
  201. totalLines=`grep -c "@" $inputFile`
  202. echo "There are $totalLines of list."
  203. echo " "
  204. echo "Hotmail: `grep -c "@hotmail" $inputFile`"
  205. echo "Yahoo: `grep -c "@yahoo" $inputFile`"
  206. echo "Gmail: `grep -c "@gmail" $inputFile`"
  207. echo "att: `grep -c "@att" $inputFile`"
  208. echo "aol: `grep -c "@aol" $inputFile`"
  209. echo "outlook: `grep -c "@outlook" $inputFile`"
  210. echo "msn: `grep -c "@msn" $inputFile`"
  211. echo "live: `grep -c "@live" $inputFile`"
  212. echo "live: `grep -c "@163" $inputFile`"
  213. echo "live: `grep -c "@icloud" $inputFile`"
  214. echo "live: `grep -c "@juno" $inputFile`"
  215. echo "live: `grep -c "@sbcglobal" $inputFile`"
  216. echo "live: `grep -c "@gmx" $inputFile`"
  217. echo "live: `grep -c "@cox" $inputFile`"
  218. echo "========================================="
  219.  
  220. # Extract email per line
  221. # from both input file
  222. IFS=$'\r\n' GLOBIGNORE='*' command eval 'mailist=($(cat $inputFile))'
  223. con=1
  224.  
  225. getKey() {
  226. echo "Memulai Proses Validator Mailist...."
  227. wait
  228. 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`
  229. scnt="$(echo "$resp" | grep "scnt: " | cut -c7- | xargs)"
  230. sessionId="$(echo "$resp" | grep "aidsp" | awk -F[=\;] '{print $2}' | xargs)"
  231. apiKey='6e8a82e92cb00781e3f19847f71ed255'
  232.  
  233. # echo "$resp"
  234. # echo "SCNT: $scnt"
  235. # echo "SESSIONID: $sessionId"
  236.  
  237. if [[ $scnt == '' || $sessionId == '' || $apiKey = '' ]]; then
  238. sleep 4
  239. echo "IP Blocked By Apple."
  240. getKey
  241. sleep 2
  242. fi
  243. }
  244.  
  245. getKey
  246.  
  247. echo "[+] Mengirim $sendList email per $perSec detik[+]"
  248.  
  249. for (( i = 0; i < "${#mailist[@]}"; i++ )); do
  250. username="${mailist[$i]}"
  251. indexer=$((con++))
  252. tot=$((totalLines--))
  253. fold=`expr $i % $sendList`
  254. if [[ $fold == 0 && $i > 0 ]]; then
  255. header="`date +%H:%M:%S`"
  256. duration=$SECONDS
  257. echo "[$header] LOADING BOS"
  258. sleep $perSec
  259. fi
  260. vander=`expr $i % 8`
  261. if [[ $vander == 0 && $i > 0 ]]; then
  262. getKey
  263. fi
  264.  
  265. nagahitam_apple_validator "$username" "$indexer" "$tot" "$targetFolder" "$inputFile" &
  266.  
  267. if [[ $isDel == 'y' ]]; then
  268. grep -v -- "$username" $inputFile > "$inputFile"_temp && mv "$inputFile"_temp $inputFile
  269. fi
  270. done
  271.  
  272. # waiting the background process to be done
  273. # then checking list from garbage collector
  274. # located on $targetFolder/unknown.txt
  275. echo "[+] Menunggu proses Selesai Checker [+]"
  276. wait
  277. wc -l $targetFolder/*
  278.  
  279. if [[ $isCompress == 'y' ]]; then
  280. tgl=`date`
  281. tgl=${tgl// /-}
  282. zipped="$targetFolder-$tgl.zip"
  283.  
  284. echo "[+] Compressing result"
  285. zip -r "compressed/$zipped" "$targetFolder/die.txt" "$targetFolder/live.txt"
  286. echo "[+] Saved to compressed/$zipped"
  287. mv $targetFolder haschecked
  288. echo "[+] $targetFolder has been moved to haschecked/"
  289. fi
  290. #rm $inputFile
  291. duration=$SECONDS
  292. echo "$(($duration / 3600)) hours $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
  293. echo "+==========+ TEAM-BUBADIBAKO - DONE CHECKER +==========+"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement