khaclep007

Pap

Nov 19th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. <?php
  2.  
  3. class NetFlix{
  4.  
  5.  
  6. public function ___contruct()
  7. {
  8.  
  9. }
  10.  
  11. private function GetList($list)
  12. {
  13. $this->list= $list;
  14.  
  15. $fp = file_get_contents($this->list,"r");
  16. $xpl = explode("\n",$fp);
  17.  
  18. for($i=0;$i<count($xpl);$i++)
  19. {
  20. return $xpl[$i];
  21. }
  22. }
  23.  
  24. public function SocksCheck()
  25. {
  26. $socks = $this->GetList("socks.txt");
  27. $this->ch = curl_init();
  28.  
  29. $url = "https://www.netflix.com/favicon.ico";
  30.  
  31. curl_setopt($this->ch, CURLOPT_URL, $url);
  32. curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
  33. curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);
  34. curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST,2);
  35. curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
  36. curl_setopt($this->ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; Android 6.0; HT16 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2564.106 Mobile Safari/537.36");
  37. curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, 30);
  38. curl_setopt($this->ch, CURLOPT_PROXY, $socks);
  39. curl_setopt($this->ch, CURLOPT_PROXYTYPE, 7);
  40. $exec = curl_exec($this->ch);
  41. if(curl_errno($this->ch)===28)
  42. {
  43. $this->throwException();
  44. }
  45. return $result;
  46. curl_close($this->ch);
  47. }
  48.  
  49.  
  50. public function authURL($url,$head_data)
  51. {
  52. $this->url = $url;
  53.  
  54. $this->ch = curl_init();
  55. curl_setopt($this->ch, CURLOPT_URL, $url);
  56. curl_setopt($this->ch, CURLOPT_VERBOSE, FALSE);
  57. //curl_setopt($this->ch, CURLINFO_HEADER_OUT, TRUE);
  58. curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
  59. curl_setopt($this->ch, CURLOPT_TIMEOUT, 5);
  60. curl_setopt($this->ch, CURLOPT_HTTPHEADER, $head_data);
  61. curl_setopt($this->ch, CURLOPT_HEADER, TRUE);
  62. curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  63. curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 2 );
  64. curl_setopt($this->ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; Android 6.0; HT16 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2564.106 Mobile Safari/537.36");
  65. curl_setopt($this->ch, CURLOPT_COOKIEJAR, 'cookies.tmp');
  66. curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION, TRUE);
  67. $result = curl_exec($this->ch);
  68.  
  69. if($result)
  70. {
  71. return $result;
  72. }
  73. curl_close($this->ch);
  74. }
  75.  
  76. public function Preg($pattern,$data)
  77. {
  78. preg_match($pattern,$data,$to);
  79.  
  80. return $to['1'];
  81. }
  82.  
  83. function Check($url,$head_data,$post_data)
  84. {
  85. $this->url = $url;
  86. $this->ch = curl_init();
  87. curl_setopt($this->ch, CURLOPT_URL, $url);
  88. curl_setopt($this->ch, CURLOPT_VERBOSE, true);
  89. curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
  90. curl_setopt($this->ch, CURLOPT_TIMEOUT, 5);
  91. curl_setopt($this->ch, CURLOPT_POST, TRUE);
  92. curl_setopt($this->ch, CURLOPT_POSTFIELDS, $post_data);
  93. curl_setopt($this->ch, CURLOPT_HTTPHEADER, $head_data);
  94. curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  95. curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, false );
  96. curl_setopt($this->ch, CURLOPT_SSL_VERIFYSTATUS, FALSE);
  97. curl_setopt ($this->ch, CURLOPT_FAILONERROR, true);
  98. curl_setopt($this->ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; Android 6.0; HT16 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2564.106 Mobile Safari/537.36");
  99. curl_setopt($this->ch, CURLOPT_COOKIEJAR, 'cookies.tmp');
  100. curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION, TRUE);
  101. $result = curl_exec($this->ch);
  102. if($result)
  103. {
  104. return $result;
  105. }
  106. curl_close($this->ch);
  107. }
  108. }
  109.  
  110. $mail = @file_get_contents($argv[1], "r") or die("Failed Open $argv[1]");
  111. $list = explode("\n", $mail);
  112.  
  113. for($i=0;$i<count($list);$i++){
  114. $head=array();
  115. $head[]="Connection: Keep-alive";
  116. $head[]="Accept: application/json, text/javascript, */*; q=0.01";
  117. $head[]="Origin: https://www.netflix.com";
  118. $head[]="X-Requested-With: XMLHttpRequest";
  119. $head[]="Content-Type: application/json";
  120. $head[]="Referer: https://www.netflix.com/sg/LoginHelp";
  121. $head[]="Accept-Language: en-US";
  122.  
  123. $start = new NetFlix;
  124. echo "Ambil token.....\n";
  125. //var_dump($start);
  126. //public function authURL($url='',$headreq='1',$head_data='',$headresp='1')
  127. $auth = $start->authURL("https://www.netflix.com/sg/Login",$head);
  128. $nfvdid = $start->Preg("@nfvdid=(.*?);@is",$auth);
  129. $secID = $start->Preg("@SecureNetflixId=(.*?);@is",$auth);
  130. $NetflixId = $start->Preg("@Set-Cookie: NetflixId=(.*?);@is",$auth);
  131. $flwssn = $start->Preg("@flwssn=(.*?);@is",$auth);
  132. $memclid = $start->Preg("@memclid=(.*?);@is",$auth);
  133. $authURL = $start->Preg("@authURL\" value=\"(.*?)\"@is",$auth);
  134. //echo $authURL;
  135.  
  136. $header = array();
  137. $header[] = "Connection: Keep-alive";
  138. $header[] = "Accept: application/json, text/javascript, */*; q=0.01";
  139. $header[] = "Origin: https://netflix.com";
  140. $header[] = "Content-type: application/json";
  141. $header[] = "Referer: https://www.netflix.com/sg/LoginHelp";
  142. $header[] = "X-Request-With: XMLHttpRequest";
  143. $header[] = "Accept-Language: en-US";
  144. $header[] = "Cookie: clSharedContext=c4383b55-b620-4339-ba66-74b5a496210b; sawContext=true; nfvdid=$nfvdid; SecureNetflixId=$secID; NetflixId=$NetflixId; __gads=ID=1f01f3f637702cda:T=1542173099:S=ALNI_MamGIDejeF4p3MaInUD_05zzA55MQ; flwssn=$flwssn; memclid=$memclid; cL=1542178123325%7C154217213258353563%7C154217597785210627%7C%7C28%7C5GDLO6C2W5BVLLBSKQD3ZCYM3A";
  145. $post = '{"fields":{"forgotPasswordChoice":{"value":"email"},"email":"'.$list[$i].'"},"mode":"enterPasswordReset","action":"nextAction","authURL":"1542178122514.NRcWc5/obAJyyFAhOgjcccqTbh0="}';
  146.  
  147. echo "Mengirim data....\n";
  148. $net = $start->Check("https://www.netflix.com:443/api/shakti/vb45817f4/login/help",$header,$post);
  149. $resp = json_decode($net,true);
  150. var_dump($resp);
  151. print_r($resp['fields']['nullHint']);
  152. print_r($resp['fields']['errorCode']);
  153. }
  154. ?>
Advertisement
Add Comment
Please, Sign In to add comment