Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class NetFlix{
- public function ___contruct()
- {
- }
- private function GetList($list)
- {
- $this->list= $list;
- $fp = file_get_contents($this->list,"r");
- $xpl = explode("\n",$fp);
- for($i=0;$i<count($xpl);$i++)
- {
- return $xpl[$i];
- }
- }
- public function SocksCheck()
- {
- $socks = $this->GetList("socks.txt");
- $this->ch = curl_init();
- $url = "https://www.netflix.com/favicon.ico";
- curl_setopt($this->ch, CURLOPT_URL, $url);
- curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST,2);
- curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
- 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");
- curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, 30);
- curl_setopt($this->ch, CURLOPT_PROXY, $socks);
- curl_setopt($this->ch, CURLOPT_PROXYTYPE, 7);
- $exec = curl_exec($this->ch);
- if(curl_errno($this->ch)===28)
- {
- $this->throwException();
- }
- return $result;
- curl_close($this->ch);
- }
- public function authURL($url,$head_data)
- {
- $this->url = $url;
- $this->ch = curl_init();
- curl_setopt($this->ch, CURLOPT_URL, $url);
- curl_setopt($this->ch, CURLOPT_VERBOSE, FALSE);
- //curl_setopt($this->ch, CURLINFO_HEADER_OUT, TRUE);
- curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($this->ch, CURLOPT_TIMEOUT, 5);
- curl_setopt($this->ch, CURLOPT_HTTPHEADER, $head_data);
- curl_setopt($this->ch, CURLOPT_HEADER, TRUE);
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 2 );
- 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");
- curl_setopt($this->ch, CURLOPT_COOKIEJAR, 'cookies.tmp');
- curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION, TRUE);
- $result = curl_exec($this->ch);
- if($result)
- {
- return $result;
- }
- curl_close($this->ch);
- }
- public function Preg($pattern,$data)
- {
- preg_match($pattern,$data,$to);
- return $to['1'];
- }
- function Check($url,$head_data,$post_data)
- {
- $this->url = $url;
- $this->ch = curl_init();
- curl_setopt($this->ch, CURLOPT_URL, $url);
- curl_setopt($this->ch, CURLOPT_VERBOSE, true);
- curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($this->ch, CURLOPT_TIMEOUT, 5);
- curl_setopt($this->ch, CURLOPT_POST, TRUE);
- curl_setopt($this->ch, CURLOPT_POSTFIELDS, $post_data);
- curl_setopt($this->ch, CURLOPT_HTTPHEADER, $head_data);
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, false );
- curl_setopt($this->ch, CURLOPT_SSL_VERIFYSTATUS, FALSE);
- curl_setopt ($this->ch, CURLOPT_FAILONERROR, true);
- 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");
- curl_setopt($this->ch, CURLOPT_COOKIEJAR, 'cookies.tmp');
- curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION, TRUE);
- $result = curl_exec($this->ch);
- if($result)
- {
- return $result;
- }
- curl_close($this->ch);
- }
- }
- $mail = @file_get_contents($argv[1], "r") or die("Failed Open $argv[1]");
- $list = explode("\n", $mail);
- for($i=0;$i<count($list);$i++){
- $head=array();
- $head[]="Connection: Keep-alive";
- $head[]="Accept: application/json, text/javascript, */*; q=0.01";
- $head[]="Origin: https://www.netflix.com";
- $head[]="X-Requested-With: XMLHttpRequest";
- $head[]="Content-Type: application/json";
- $head[]="Referer: https://www.netflix.com/sg/LoginHelp";
- $head[]="Accept-Language: en-US";
- $start = new NetFlix;
- echo "Ambil token.....\n";
- //var_dump($start);
- //public function authURL($url='',$headreq='1',$head_data='',$headresp='1')
- $auth = $start->authURL("https://www.netflix.com/sg/Login",$head);
- $nfvdid = $start->Preg("@nfvdid=(.*?);@is",$auth);
- $secID = $start->Preg("@SecureNetflixId=(.*?);@is",$auth);
- $NetflixId = $start->Preg("@Set-Cookie: NetflixId=(.*?);@is",$auth);
- $flwssn = $start->Preg("@flwssn=(.*?);@is",$auth);
- $memclid = $start->Preg("@memclid=(.*?);@is",$auth);
- $authURL = $start->Preg("@authURL\" value=\"(.*?)\"@is",$auth);
- //echo $authURL;
- $header = array();
- $header[] = "Connection: Keep-alive";
- $header[] = "Accept: application/json, text/javascript, */*; q=0.01";
- $header[] = "Origin: https://netflix.com";
- $header[] = "Content-type: application/json";
- $header[] = "Referer: https://www.netflix.com/sg/LoginHelp";
- $header[] = "X-Request-With: XMLHttpRequest";
- $header[] = "Accept-Language: en-US";
- $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";
- $post = '{"fields":{"forgotPasswordChoice":{"value":"email"},"email":"'.$list[$i].'"},"mode":"enterPasswordReset","action":"nextAction","authURL":"1542178122514.NRcWc5/obAJyyFAhOgjcccqTbh0="}';
- echo "Mengirim data....\n";
- $net = $start->Check("https://www.netflix.com:443/api/shakti/vb45817f4/login/help",$header,$post);
- $resp = json_decode($net,true);
- var_dump($resp);
- print_r($resp['fields']['nullHint']);
- print_r($resp['fields']['errorCode']);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment