Advertisement
kaiz1337

apel

Mar 13th, 2018
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.12 KB | None | 0 0
  1. <?php
  2. /**
  3. * Creator CLI by NdunPresent
  4. * Inspirasi Template by Malhadi Jr
  5. * Date: 17 January 2018
  6. * New Update
  7. * Date: 02 Februari 2018
  8. */
  9. error_reporting(0);
  10. ini_set("memory_limit", "-1");
  11. date_default_timezone_set("Asia/Jakarta");
  12. class apple
  13. {
  14. function __construct()
  15. {
  16. echo "Enter Mailist : ";
  17. $this->file = rtrim(fgets(STDIN));
  18. echo "Enter Folder : ";
  19. $this->folder = rtrim(fgets(STDIN));
  20. if(is_dir($this->folder))
  21. {
  22. echo $this->folder."/folder are exists, append to them ? (y/n) : ";
  23. $this->input = rtrim(fgets(STDIN));
  24. if($this->input == 'y' || $this->input == 'Y')
  25. {
  26. $this->opendir = opendir($this->folder);
  27. while(($this->readdir = readdir($this->opendir)) !== false)
  28. {
  29. unlink($this->folder."/".$this->readdir);
  30. }
  31. closedir($this->opendir);
  32. }
  33. else
  34. {
  35. $this->opendir = opendir($this->folder);
  36. while(($this->readdir = readdir($this->opendir)) !== false)
  37. {
  38. unlink($this->folder."/".$this->readdir);
  39. }
  40. closedir($this->opendir);
  41. rmdir($this->folder);
  42. echo "Enter Folder : ";
  43. $this->folder = rtrim(fgets(STDIN));
  44. mkdir($this->folder);
  45. }
  46. }
  47. else
  48. {
  49. mkdir($this->folder);
  50. }
  51. }
  52. public function myfile()
  53. {
  54. $this->myfile = file_get_contents($this->file);
  55. if(!file_exists($this->file))
  56. {
  57. echo "File not found!";
  58. exit();
  59. }
  60.  
  61. return array(
  62. 'list' => explode("\r\n", $this->myfile),
  63. 'count' => count(explode("\r\n", $this->myfile))
  64. );
  65. }
  66. public function savefile($namefile = null, $content = null)
  67. {
  68. $fp = fopen($namefile, "a+");
  69. $fw = fwrite($fp, $content);
  70. if($fw)
  71. {
  72. return true;
  73. fclose($fp);
  74. }
  75. else
  76. {
  77. return false;
  78. fclose($fp);
  79. }
  80. }
  81. public function getheader($url)
  82. {
  83. $ch = curl_init();
  84. curl_setopt($ch, CURLOPT_POST, 0);
  85. curl_setopt($ch, CURLOPT_URL, $url);
  86. curl_setopt($ch, CURLOPT_HEADER, true);
  87. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  88. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  89. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  90. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  91. curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd() . "/cookies.txt");
  92. curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd() . "/cookies.txt");
  93. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");
  94.  
  95. $result = curl_exec($ch);
  96. curl_close($ch);
  97.  
  98. return $result;
  99. }
  100. public function applecheck($email, $scnt, $cookies)
  101. {
  102. $ch = curl_init();
  103. curl_setopt($ch, CURLOPT_POST, 1);
  104. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  105. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  106. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  107. curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
  108. curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd() . "/cookies.txt");
  109. curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd() . "/cookies.txt");
  110. curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"emailAddress\":\"$email\"}");
  111. curl_setopt($ch, CURLOPT_URL, "https://appleid.apple.com/account/validation/appleid");
  112. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36");
  113. $headers = array();
  114. $headers[] = "Scnt: {$scnt}";
  115. $headers[] = "Origin: https://appleid.apple.com";
  116. $headers[] = "Accept-Encoding: gzip, deflate, br";
  117. $headers[] = "X-Apple-I-Fd-Client-Info: {\"U\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36\",\"L\":\"en-GB\",\"Z\":\"GMT+07:00\",\"V\":\"1.1\",\"F\":\"V8a44j1e3NlY5BSo9z4ofjb75PaK4Vpjt.gEngMQEjZr_WhXTA2s.XTVV26y8GGEDd5ihORoVyFGh8cmvSuCKzIlnY6xljQlpRD.arbo8vLUGvLG9mhORoVidPZW2AUMnGWVQdgMVQdg1kzoMpwoNJ9z4oYYLzZ1kzDlSgyyITL5q8sgEV18u1.BUs_43wuZPup_nH2t05oaYAhrcpMxE6DBUr5xj6Kks1QTUFbhOx6hO3f9p_nH1zDz0oc4xUC569XXTqbOtJJIqSI6KUMnGWpwoNSUC56MnGW87gq1HACVdXVApv9_2q2pjAT5Ju30m_dhre9zH_y3Cmd.1wcDclruAs.eNk0JkLJsVRcWprTMez1KyJCp0iK7.M_Kpil1BNlY6SF0Y5BOgkLT0XxU..5f2\"}";
  118. $headers[] = "Accept-Language: en-GB,en-US;q=0.9,en;q=0.8";
  119. $headers[] = "X-Requested-With: XMLHttpRequest";
  120. $headers[] = "Cookie: idclient=web; dslang=GB-EN; site=GBR; aidsp={$cookies}; ccl=0f9nnGqTs7u/Cz0vYpHmMQ==; geo=ID";
  121. $headers[] = "Connection: keep-alive";
  122. $headers[] = "X-Apple-Api-Key: cbf64fd6843ee630b463f358ea0b707b";
  123. $headers[] = "X-Apple-Id-Session-Id: {$cookies}";
  124. $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36";
  125. $headers[] = "Content-Type: application/json";
  126. $headers[] = "Accept: application/json, text/javascript, */*; q=0.01";
  127. $headers[] = "Referer: https://appleid.apple.com/account";
  128. $headers[] = "X-Apple-Request-Context: create";
  129. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  130.  
  131. $result = curl_exec($ch);
  132. curl_close ($ch);
  133.  
  134. return $result;
  135. }
  136. public function close() {
  137. $path = getcwd();
  138. $path = str_replace("\\", "/", $path);
  139. echo "################################################\n";
  140. echo "Save to " . $path . "/" . $this->folder . "\n";
  141. echo "################################################\n";
  142. }
  143. public function exec()
  144. {
  145. $list = $this->myfile();
  146. $no = 1;
  147. $red = "\033[1;31m";
  148. $yell = "\033[1;33m";
  149. $grn = "\033[1;32m";
  150. $blue = "\033[1;34m";
  151. $prpl = "\033[1;35m";
  152. $orng = "\033[0;33m";
  153. $cyan = "\033[1;36m";
  154. $whit = "\033[37m";
  155. $wht = "\033[37m";
  156. $end = "\033[0m";
  157. $size = filesize($this->file)/1024;
  158. $size = round($size,3);
  159. if($size >= 1024){
  160. $size = round($size/1024,2).' MB';
  161. }else{
  162. $size = $size.' KB';
  163. }
  164. echo "################################################\n";
  165. echo "INFO\n";
  166. echo "File Size: " . $size . "\n";
  167. echo "To Folder: " . $this->folder . "\n";
  168. echo "From : " . $this->file . "\n";
  169. echo "################################################\n";
  170. foreach($list['list'] as $key => $email)
  171. {
  172. $get = $this->getheader("https://appleid.apple.com/account");
  173. preg_match_all("/scnt: (.*)/i", $get, $header);
  174. preg_match_all("~(Set-Cookie: aidsp=(.*?);)~", $get, $cookies);
  175. $val = $this->applecheck($email, $header[1][0], $cookies[2][0]);
  176. $json = json_decode($val, true);
  177. unlink("cookies.txt");
  178. if(filter_var($email, FILTER_VALIDATE_EMAIL))
  179. {
  180. if($json['used'] === true)
  181. {
  182. echo $wht . "[From " . $this->file . " to folder " . $this->folder . "] " . $prpl . "[" . $no . "/" . $list['count'] . "] " . $yell . "LIVE => " . $email . " " . $whit . "[Validator Apple - DayatEswee]" . $end . "\n";
  183. $this->savefile($this->folder . "/apple-live.txt", "LIVE => " . $email . "\r\n");
  184. }
  185. else
  186. {
  187. if($json['used'] === false)
  188. {
  189. echo $wht . "[From " . $this->file . " to folder " . $this->folder . "] " . $prpl . "[" . $no . "/" . $list['count'] . "] " . $red . "DEAD => " . $email . " " . $whit . "[Validator Apple - DayatEswee]" . $end . "\n";
  190. $this->savefile($this->folder . "/apple-dead.txt", "DEAD => " . $email . "\r\n");
  191. }
  192. else
  193. {
  194. echo $wht . "[From " . $this->file . " to folder " . $this->folder . "] " . $prpl . "[" . $no . "/" . $list['count'] . "] " . $cyan . "UNKNOWN => " . $email . " " . $whit . "[Validator Apple - DayatEswee]" . $end . "\n";
  195. $this->savefile($this->folder . "/apple-unknown.txt", "UNKNOWN => " . $email . "\r\n");
  196. }
  197. }
  198. }
  199. else
  200. {
  201. echo $wht . "[From " . $this->file . " to folder " . $this->folder . "] " . $prpl . "[" . $no . "/" . $list['count'] . "] " . $orng . "WRONG FORMAT => " . $email . " " . $whit . "[Validator Apple - DayatEswee]" . $end . "\n";
  202. $this->savefile($this->folder . "/apple-wrong.txt", "WRONG FORMAT=> " . $email . "\r\n");
  203. }
  204. $no++;
  205. }
  206. }
  207. }
  208. $apple = new apple;
  209. print_r($apple->exec());
  210. $apple->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement