Advertisement
kintol1212

instagram account creator updatee

Oct 11th, 2018
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.05 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. class curl {
  4.     var $ch, $agent, $error, $info, $cookiefile, $savecookie;  
  5.     function curl() {
  6.         $this->ch = curl_init();
  7.         curl_setopt ($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.164.0 Safari/530.1');
  8.         curl_setopt ($this->ch, CURLOPT_HEADER, 1);
  9.         curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, 1);
  10.         curl_setopt ($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
  11.         curl_setopt ($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
  12.         curl_setopt ($this->ch, CURLOPT_FOLLOWLOCATION,true);
  13.         curl_setopt ($this->ch, CURLOPT_TIMEOUT, 30);
  14.         curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,30);
  15.     }
  16.     function header($header) {
  17.         curl_setopt ($this->ch, CURLOPT_HTTPHEADER, $header);
  18.     }
  19.     function timeout($time){
  20.         curl_setopt ($this->ch, CURLOPT_TIMEOUT, $time);
  21.         curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,$time);
  22.     }
  23.     function http_code() {
  24.         return curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
  25.     }
  26.     function error() {
  27.         return curl_error($this->ch);
  28.     }
  29.     function ssl($veryfyPeer, $verifyHost){
  30.         curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $veryfyPeer);
  31.         curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $verifyHost);
  32.     }
  33.     function cookies($cookie_file_path) {
  34.         $this->cookiefile = $cookie_file_path;;
  35.         $fp = fopen($this->cookiefile,'wb');fclose($fp);
  36.         curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->cookiefile);
  37.         curl_setopt ($this->ch, CURLOPT_COOKIEFILE, $this->cookiefile);
  38.     }
  39.     function proxy($sock) {
  40.         curl_setopt ($this->ch, CURLOPT_HTTPPROXYTUNNEL, true);
  41.         curl_setopt ($this->ch, CURLOPT_PROXY, $sock);
  42.     }
  43.     function post($url, $data) {
  44.         curl_setopt($this->ch, CURLOPT_POST, 1);   
  45.         curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
  46.         return $this->getPage($url);
  47.     }
  48.     function data($url, $data, $hasHeader=true, $hasBody=true) {
  49.         curl_setopt ($this->ch, CURLOPT_POST, 1);
  50.         curl_setopt ($this->ch, CURLOPT_POSTFIELDS, http_build_query($data));
  51.         return $this->getPage($url, $hasHeader, $hasBody);
  52.     }
  53.     function get($url, $hasHeader=true, $hasBody=true) {
  54.         curl_setopt ($this->ch, CURLOPT_POST, 0);
  55.         return $this->getPage($url, $hasHeader, $hasBody);
  56.     }  
  57.     function getPage($url, $hasHeader=true, $hasBody=true) {
  58.         curl_setopt($this->ch, CURLOPT_HEADER, $hasHeader ? 1 : 0);
  59.         curl_setopt($this->ch, CURLOPT_NOBODY, $hasBody ? 0 : 1);
  60.         curl_setopt ($this->ch, CURLOPT_URL, $url);
  61.         $data = curl_exec ($this->ch);
  62.         $this->error = curl_error ($this->ch);
  63.         $this->info = curl_getinfo ($this->ch);
  64.         return $data;
  65.     }
  66. }
  67.  
  68. function fetchCurlCookies($source) {
  69.     preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $source, $matches);
  70.     $cookies = array();
  71.     foreach($matches[1] as $item) {
  72.         parse_str($item, $cookie);
  73.         $cookies = array_merge($cookies, $cookie);
  74.     }
  75.     return $cookies;
  76. }
  77.  
  78. function string($length = 15)
  79. {
  80.     $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
  81.     $charactersLength = strlen($characters);
  82.     $randomString = '';
  83.     for ($i = 0; $i < $length; $i++) {
  84.         $randomString .= $characters[rand(0, $charactersLength - 1)];
  85.     }
  86.     return $randomString;
  87. }
  88.  
  89. function angka($length = 15)
  90. {
  91.     $characters = '0123456789';
  92.     $charactersLength = strlen($characters);
  93.     $randomString = '';
  94.     for ($i = 0; $i < $length; $i++) {
  95.         $randomString .= $characters[rand(0, $charactersLength - 1)];
  96.     }
  97.     return $randomString;
  98. }
  99. function fetch_value($str,$find_start,$find_end) {
  100.     $start = @strpos($str,$find_start);
  101.     if ($start === false) {
  102.         return "";
  103.     }
  104.     $length = strlen($find_start);
  105.     $end    = strpos(substr($str,$start +$length),$find_end);
  106.     return trim(substr($str,$start +$length,$end));
  107. }
  108. function instagram_account_creator($socks, $timeout) {
  109.     $curl = new curl();
  110.     $curl->cookies('cookies/'.md5($_SERVER['REMOTE_ADDR']).'.txt');
  111.     $curl->ssl(0, 2);
  112.     $curl->timeout($timeout);
  113.     $curl->proxy($socks);
  114.  
  115.     $random_user = $curl->post('https://www.fakepersongenerator.com/Index/generate', 'gender=0&age=0&state=0&city=');
  116.     preg_match_all('/<div class="info-detail">(.*?)<\/div>/s', $random_user, $info);
  117.     $mail = fetch_value($info[1][0], "<input type=\"text\" value='","' class='form-control' />");
  118.     $email = string(4).$mail;
  119.     $name = fetch_value($random_user, "<p class='text-center name'><b class='click'>","</b></p>");
  120.     $uname = fetch_value($info[1][50], "<p>","<br>");
  121.     $username = $uname.string(4);
  122.     $password = fetch_value($info[1][51], "<p>","<br>");
  123.     $user_agent = fetch_value($info[1][74], "<p>","</p>");
  124.  
  125.  
  126.     $page_signup = $curl->get('https://www.instagram.com/accounts/signup/email');
  127.     $cookies = fetchCurlCookies($page_signup);
  128.     $csrftoken = $cookies['csrftoken'];
  129.     $mid = $cookies['mid'];
  130.  
  131.     if ($page_signup) {
  132.  
  133.         $headers = array();
  134.         $headers[] = "Origin: https://www.instagram.com";
  135.         $headers[] = "Accept-Language: en-US,en;q=0.9";
  136.         $headers[] = "X-Requested-With: XMLHttpRequest";
  137.         $headers[] = "User-Agent: ".$user_agent."";
  138.         $headers[] = "Cookie: mid=".$mid."; mcd=3; csrftoken=".$csrftoken."; rur=FRC;";
  139.         $headers[] = "X-Csrftoken: ".$csrftoken."";
  140.         $headers[] = "X-Instagram-Ajax: 3c390ba4b80b";
  141.         $headers[] = "Content-Type: application/x-www-form-urlencoded";
  142.         $headers[] = "Accept: */*";
  143.         $headers[] = "Referer: https://www.instagram.com/accounts/signup/email";
  144.         $headers[] = "Authority: www.instagram.com";
  145.         $curl->header($headers);
  146.  
  147.         $check_mail = $curl->post('https://www.instagram.com/accounts/check_email/', 'email='.$email.'');
  148.  
  149.  
  150.         if (strpos($check_mail, '"available": true')) {
  151.  
  152.             $check_username = $curl->post('https://www.instagram.com/accounts/username_suggestions/', 'email='.$email.'&name='.$name.'');
  153.  
  154.             if (strpos($check_username, '"status": "ok"')) {
  155.  
  156.                 $create = $curl->post('https://www.instagram.com/accounts/web_create_ajax/', 'email='.$email.'&password='.$password.'&username='.$username.'&first_name='.$name.'&client_id='.$mid.'&seamless_login_enabled=1&tos_version=row');
  157.  
  158.                 if (stripos($create, '"account_created": true')) {
  159.                     echo "SUCCESS CREATE | ".$socks." | ".$email." | ".$username." | ".$password."\n";
  160.                     $data =  "SUCCESS CREATE | ".$socks." | ".$email." | ".$username." | ".$password."\r\n";
  161.                     $date = date('d/y/m');
  162.                     $fh = fopen("success_".$date.".txt", "a");
  163.                     fwrite($fh, $data);
  164.                     fclose($fh);
  165.                 } elseif(strpos($create, 'The IP address you are using has been flagged as an open proxy')) {
  166.                     echo "IP BLOCKED | ".$socks." | ".$email." | ".$username." | ".$password."\n";
  167.                     flush();
  168.                     ob_flush();
  169.                 } else {
  170.                     echo "FAILED | ".$socks." | ".$email." | ".$username." | ".$password."\n";
  171.                     flush();
  172.                     ob_flush();
  173.                 }
  174.             } else {
  175.                 echo "FAILED | ".$socks." | ".$email." | ".$username." | ".$password."\n";
  176.                 flush();
  177.                 ob_flush();
  178.             }
  179.  
  180.         } else {
  181.             echo "EMAIL ALREADY REGISTER | ".$email."\n";
  182.             flush();
  183.             ob_flush();
  184.         }
  185.  
  186.  
  187.     } else {
  188.         $data['httpcode'] = $curl->http_code();
  189.         $error = $curl->error();
  190.         echo "".$socks." | ".$error." | Http code : ".$data['httpcode']."\n";
  191.         flush();
  192.         ob_flush();
  193.     }
  194.  
  195. }
  196.  
  197. echo "
  198. =======================================
  199.      #INSTAGRAM ACCOUNT CREATOR#
  200.          (USE PROXY)
  201. =======================================
  202.    CREATED BY YUDHA TIRA PAMUNGKAS
  203. =======================================
  204. \n";
  205.  
  206. echo "LIST TOOLS\n";
  207. echo "[1] INSTAGRAM ACCOUNT CREATOR\n";
  208. echo "Select tools: ";
  209. $list = trim(fgets(STDIN));
  210. if ($list == "") {
  211.     die ("Cannot be blank!\n");
  212. }
  213.  
  214. if ($list == 1) {
  215.     echo "INSTAGRAM ACCOUNT CREATOR\n";
  216.     sleep(1);
  217.     echo "Name file proxy (Ex: proxy.txt): ";
  218.     $namefile = trim(fgets(STDIN));
  219.     if ($namefile == "") {
  220.         die ("Proxy cannot be blank!\n");
  221.     }
  222.     echo "Timeout : ";
  223.     $timeout = trim(fgets(STDIN));
  224.     if ($timeout == "") {
  225.         die ("Cannot be blank!\n");
  226.     }
  227.     echo "Please wait";
  228.     sleep(1);
  229.     echo ".";
  230.     sleep(1);
  231.     echo ".";
  232.     sleep(1);
  233.     echo ".\n";
  234.     $file = file_get_contents($namefile) or die ("File not found!\n");
  235.     $socks = explode("\r\n",$file);
  236.     $total = count($socks);
  237.     echo "Total proxy: ".$total."\n";
  238.  
  239.     foreach ($socks as $value) {
  240.         instagram_account_creator($value, $timeout);
  241.     }
  242.  
  243. } else {
  244.     die ("Command not found!\n");
  245. }
  246.  
  247. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement