SHOW:
|
|
- or go back to the newest paste.
| 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 http_code() {
| |
| 20 | return curl_getinfo($this->ch, CURLINFO_HTTP_CODE); | |
| 21 | } | |
| 22 | function error() {
| |
| 23 | return curl_error($this->ch); | |
| 24 | } | |
| 25 | function ssl($veryfyPeer, $verifyHost){
| |
| 26 | curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $veryfyPeer); | |
| 27 | curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $verifyHost); | |
| 28 | } | |
| 29 | function cookies($cookie_file_path) {
| |
| 30 | $this->cookiefile = $cookie_file_path;; | |
| 31 | $fp = fopen($this->cookiefile,'wb');fclose($fp); | |
| 32 | curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->cookiefile); | |
| 33 | curl_setopt ($this->ch, CURLOPT_COOKIEFILE, $this->cookiefile); | |
| 34 | } | |
| 35 | function proxy($sock) {
| |
| 36 | curl_setopt ($this->ch, CURLOPT_HTTPPROXYTUNNEL, true); | |
| 37 | curl_setopt ($this->ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); | |
| 38 | curl_setopt ($this->ch, CURLOPT_PROXY, $sock); | |
| 39 | } | |
| 40 | function post($url, $data) {
| |
| 41 | curl_setopt($this->ch, CURLOPT_POST, 1); | |
| 42 | curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data); | |
| 43 | return $this->getPage($url); | |
| 44 | } | |
| 45 | function data($url, $data, $hasHeader=true, $hasBody=true) {
| |
| 46 | curl_setopt ($this->ch, CURLOPT_POST, 1); | |
| 47 | curl_setopt ($this->ch, CURLOPT_POSTFIELDS, http_build_query($data)); | |
| 48 | return $this->getPage($url, $hasHeader, $hasBody); | |
| 49 | } | |
| 50 | function get($url, $hasHeader=true, $hasBody=true) {
| |
| 51 | curl_setopt ($this->ch, CURLOPT_POST, 0); | |
| 52 | return $this->getPage($url, $hasHeader, $hasBody); | |
| 53 | } | |
| 54 | function getPage($url, $hasHeader=true, $hasBody=true) {
| |
| 55 | curl_setopt($this->ch, CURLOPT_HEADER, $hasHeader ? 1 : 0); | |
| 56 | curl_setopt($this->ch, CURLOPT_NOBODY, $hasBody ? 0 : 1); | |
| 57 | curl_setopt ($this->ch, CURLOPT_URL, $url); | |
| 58 | $data = curl_exec ($this->ch); | |
| 59 | $this->error = curl_error ($this->ch); | |
| 60 | $this->info = curl_getinfo ($this->ch); | |
| 61 | return $data; | |
| 62 | } | |
| 63 | } | |
| 64 | ||
| 65 | function fetchCurlCookies($source) {
| |
| 66 | preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $source, $matches);
| |
| 67 | $cookies = array(); | |
| 68 | foreach($matches[1] as $item) {
| |
| 69 | parse_str($item, $cookie); | |
| 70 | $cookies = array_merge($cookies, $cookie); | |
| 71 | } | |
| 72 | return $cookies; | |
| 73 | } | |
| 74 | ||
| 75 | function string($length = 15) | |
| 76 | {
| |
| 77 | $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; | |
| 78 | $charactersLength = strlen($characters); | |
| 79 | $randomString = ''; | |
| 80 | for ($i = 0; $i < $length; $i++) {
| |
| 81 | $randomString .= $characters[rand(0, $charactersLength - 1)]; | |
| 82 | } | |
| 83 | return $randomString; | |
| 84 | } | |
| 85 | ||
| 86 | function angka($length = 15) | |
| 87 | {
| |
| 88 | $characters = '0123456789'; | |
| 89 | $charactersLength = strlen($characters); | |
| 90 | $randomString = ''; | |
| 91 | for ($i = 0; $i < $length; $i++) {
| |
| 92 | $randomString .= $characters[rand(0, $charactersLength - 1)]; | |
| 93 | } | |
| 94 | return $randomString; | |
| 95 | } | |
| 96 | ||
| 97 | function fetch_value($str,$find_start,$find_end) {
| |
| 98 | $start = @strpos($str,$find_start); | |
| 99 | if ($start === false) {
| |
| 100 | return ""; | |
| 101 | } | |
| 102 | $length = strlen($find_start); | |
| 103 | $end = strpos(substr($str,$start +$length),$find_end); | |
| 104 | return trim(substr($str,$start +$length,$end)); | |
| 105 | } | |
| 106 | function instagram_account_creator($socks) {
| |
| 107 | $curl = new curl(); | |
| 108 | $curl->cookies('cookies/'.md5($_SERVER['REMOTE_ADDR']).'.txt');
| |
| 109 | $curl->ssl(0, 2); | |
| 110 | $curl->proxy($socks); | |
| 111 | $register = $curl->get('https://www.instagram.com/accounts/emailsignup/');
| |
| 112 | ||
| 113 | $cookies = fetchCurlCookies($register); | |
| 114 | $csrftoken = $cookies['csrftoken']; | |
| 115 | $mid = $cookies['mid']; | |
| 116 | ||
| 117 | if ($register) {
| |
| 118 | ||
| 119 | $headers = array(); | |
| 120 | $headers[] = "accept-language: en-US,en;q=0.9"; | |
| 121 | $headers[] = "content-type: application/x-www-form-urlencoded"; | |
| 122 | $headers[] = 'cookie: mid='.$mid.'; mcd=3; shbid=13734; rur=FTW; csrftoken='.$csrftoken.'; csrftoken='.$csrftoken.';'; | |
| 123 | $headers[] = "referer: https://www.instagram.com/accounts/emailsignup/"; | |
| 124 | $headers[] = "user-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.54"; | |
| 125 | $headers[] = "x-csrftoken: ".$csrftoken.""; | |
| 126 | $curl->header($headers); | |
| 127 | ||
| 128 | $page_api = file_get_contents('https://randomuser.me/api/');
| |
| 129 | $first = fetch_value($page_api, '"first":"','"'); | |
| 130 | $last = fetch_value($page_api, '"last":"','"'); | |
| 131 | $name = $first.' '.$last; | |
| 132 | $user = fetch_value($page_api, '"username":"','"'); | |
| 133 | $domain = array ('@gmail.com','@yahoo.com','@mail.com','@yandex.com','@gmx.de','@t-online.de','@yahoo.co.id','@yahoo.co.uk');
| |
| 134 | $random = rand(0,7); | |
| 135 | $email = $user.angka(3).$domain[$random]; | |
| 136 | $username = $user.angka(4); | |
| 137 | $password = string(8); | |
| 138 | ||
| 139 | $page_register = $curl->post('https://www.instagram.com/accounts/web_create_ajax/', 'email='.$email.'&password='.$password.'&username='.$username.'&first_name='.$name.'&seamless_login_enabled=1&tos_version=row&opt_into_one_tap=false');
| |
| 140 | ||
| 141 | if (strpos($page_register, '"account_created": true')) {
| |
| 142 | echo "SUCCESS CREATE | ".$socks." | ".$email." | ".$username." | ".$password."\n"; | |
| 143 | $data = "SUCCESS CREATE | ".$socks." | ".$email." | ".$username." | ".$password."\r\n"; | |
| 144 | $fh = fopen("success.txt", "a");
| |
| 145 | fwrite($fh, $data); | |
| 146 | fclose($fh); | |
| 147 | flush(); | |
| 148 | ob_flush(); | |
| 149 | } elseif(strpos($page_register, '"account_created": false')) {
| |
| 150 | echo "FAILED | ".$socks." | ".$email." | ".$username." | ".$password."\n"; | |
| 151 | flush(); | |
| 152 | ob_flush(); | |
| 153 | } | |
| 154 | ||
| 155 | } else {
| |
| 156 | $data['httpcode'] = $curl->http_code(); | |
| 157 | $error = $curl->error(); | |
| 158 | echo "".$socks." | ".$error." | Http code : ".$data['httpcode']."\n"; | |
| 159 | flush(); | |
| 160 | ob_flush(); | |
| 161 | } | |
| 162 | } | |
| 163 | ||
| 164 | function instagram_account_creator_like($socks, $link) {
| |
| 165 | ||
| 166 | $curl = new curl(); | |
| 167 | $curl->cookies('cookies/'.md5($_SERVER['REMOTE_ADDR']).'.txt');
| |
| 168 | $curl->ssl(0, 2); | |
| 169 | $curl->proxy($socks); | |
| 170 | $register = $curl->get('https://www.instagram.com/accounts/emailsignup/');
| |
| 171 | ||
| 172 | $cookies = fetchCurlCookies($register); | |
| 173 | $csrftoken = $cookies['csrftoken']; | |
| 174 | $mid = $cookies['mid']; | |
| 175 | ||
| 176 | if ($register) {
| |
| 177 | ||
| 178 | $headers = array(); | |
| 179 | $headers[] = "accept-language: en-US,en;q=0.9"; | |
| 180 | $headers[] = "content-type: application/x-www-form-urlencoded"; | |
| 181 | $headers[] = 'cookie: mid='.$mid.'; mcd=3; shbid=13734; rur=FTW; csrftoken='.$csrftoken.'; csrftoken='.$csrftoken.';'; | |
| 182 | $headers[] = "referer: https://www.instagram.com/accounts/emailsignup/"; | |
| 183 | $headers[] = "user-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.54"; | |
| 184 | $headers[] = "x-csrftoken: ".$csrftoken.""; | |
| 185 | $curl->header($headers); | |
| 186 | ||
| 187 | $page_api = file_get_contents('https://randomuser.me/api/');
| |
| 188 | $first = fetch_value($page_api, '"first":"','"'); | |
| 189 | $last = fetch_value($page_api, '"last":"','"'); | |
| 190 | $name = $first.' '.$last; | |
| 191 | $user = fetch_value($page_api, '"username":"','"'); | |
| 192 | $domain = array ('@gmail.com','@yahoo.com','@mail.com','@yandex.com','@gmx.de','@t-online.de','@yahoo.co.id','@yahoo.co.uk');
| |
| 193 | $random = rand(0,7); | |
| 194 | $email = $user.angka(3).$domain[$random]; | |
| 195 | $username = $user.angka(4); | |
| 196 | $password = string(8); | |
| 197 | ||
| 198 | $page_register = $curl->post('https://www.instagram.com/accounts/web_create_ajax/', 'email='.$email.'&password='.$password.'&username='.$username.'&first_name='.$name.'&seamless_login_enabled=1&tos_version=row&opt_into_one_tap=false');
| |
| 199 | ||
| 200 | if (strpos($page_register, '"account_created": true')) {
| |
| 201 | echo "SUCCESS CREATE | ".$socks." | ".$email." | ".$username." | ".$password."\n"; | |
| 202 | $data = "SUCCESS CREATE | ".$socks." | ".$email." | ".$username." | ".$password."\r\n"; | |
| 203 | $fh = fopen("success.txt", "a");
| |
| 204 | fwrite($fh, $data); | |
| 205 | fclose($fh); | |
| 206 | ||
| 207 | $page_login = $curl->post('https://www.instagram.com/accounts/login/ajax/?hl=en', 'username='.$username.'&password='.$password.'&queryParams=%7B%22hl%22%3A%22en%22%7D');
| |
| 208 | ||
| 209 | if (strpos($page_login, '"authenticated": false')) {
| |
| 210 | echo "LOGIN FAILED | ".$socks." | ".$email." | ".$username." | ".$password."\n"; | |
| 211 | flush(); | |
| 212 | ob_flush(); | |
| 213 | } elseif (strpos($page_login, '"authenticated": true')) {
| |
| 214 | ||
| 215 | $page_profil = $curl->get($link); | |
| 216 | preg_match_all('/{"__typename":"GraphImage","id":"(.*?)"/s', $page_profil, $mediaid);
| |
| 217 | ||
| 218 | foreach ($mediaid[1] as $value) {
| |
| 219 | ||
| 220 | $like = $curl->post('https://www.instagram.com/web/likes/'.$value.'/like/', null);
| |
| 221 | ||
| 222 | if (strpos($like, '"status": "ok"')) {
| |
| 223 | echo "SUCCESS LIKE | ".$socks." | ".$email." | ".$username." | ".$password." | MediaID: ".$value."\n"; | |
| 224 | flush(); | |
| 225 | ob_flush(); | |
| 226 | } else {
| |
| 227 | echo "ACTION BLOCKED | ".$socks." | ".$email." | ".$username." | ".$password." | MediaID: ".$value."\n"; | |
| 228 | flush(); | |
| 229 | ob_flush(); | |
| 230 | } | |
| 231 | ||
| 232 | } | |
| 233 | ||
| 234 | } | |
| 235 | ||
| 236 | } elseif(strpos($page_register, '"account_created": false')) {
| |
| 237 | echo "FAILED | ".$socks." | ".$email." | ".$username." | ".$password."\n"; | |
| 238 | flush(); | |
| 239 | ob_flush(); | |
| 240 | } | |
| 241 | ||
| 242 | } else {
| |
| 243 | $data['httpcode'] = $curl->http_code(); | |
| 244 | $error = $curl->error(); | |
| 245 | echo "".$socks." | ".$error." | Http code : ".$data['httpcode']."\n"; | |
| 246 | flush(); | |
| 247 | ob_flush(); | |
| 248 | } | |
| 249 | } | |
| 250 | ||
| 251 | echo "LIST TOOLS\n"; | |
| 252 | echo "[1] INSTAGRAM ACCOUNT CREATOR\n"; | |
| 253 | echo "[2] INSTAGRAM ACCOUNT CREATOR + AUTO LIKE\n"; | |
| 254 | echo "Select tools: "; | |
| 255 | $list = trim(fgets(STDIN)); | |
| 256 | ||
| 257 | ||
| 258 | if ($list == 1) {
| |
| 259 | echo "INSTAGRAM ACCOUNT CREATOR\n"; | |
| 260 | sleep(1); | |
| 261 | echo "Name file socks (Ex: socks.txt): "; | |
| 262 | $namefile = trim(fgets(STDIN)); | |
| 263 | if ($namefile == "") {
| |
| 264 | die ("Socks cannot be blank!\n");
| |
| 265 | } | |
| 266 | echo "Please wait"; | |
| 267 | sleep(1); | |
| 268 | echo "."; | |
| 269 | sleep(1); | |
| 270 | echo "."; | |
| 271 | sleep(1); | |
| 272 | echo ".\n"; | |
| 273 | $file = file_get_contents($namefile) or die ("File not found!\n");
| |
| 274 | $socks = explode("\r\n",$file);
| |
| 275 | $total = count($socks); | |
| 276 | echo "Total socks: ".$total."\n"; | |
| 277 | ||
| 278 | foreach ($socks as $value) {
| |
| 279 | instagram_account_creator($value); | |
| 280 | } | |
| 281 | ||
| 282 | } elseif ($list == 2) {
| |
| 283 | echo "INSTAGRAM ACCOUNT CREATOR + AUTO LIKE\n"; | |
| 284 | sleep(1); | |
| 285 | echo "Name file socks (Ex: socks.txt): "; | |
| 286 | $namefile = trim(fgets(STDIN)); | |
| 287 | if ($namefile == "") {
| |
| 288 | die ("Socks cannot be blank!\n");
| |
| 289 | } | |
| 290 | echo "Link (Ex: https://www.instagram.com/yudhatira/): "; | |
| 291 | $link = trim(fgets(STDIN)); | |
| 292 | if ($link == "") {
| |
| 293 | die ("Link cannot be blank!\n");
| |
| 294 | } | |
| 295 | sleep(1); | |
| 296 | echo "Please wait"; | |
| 297 | sleep(1); | |
| 298 | echo "."; | |
| 299 | sleep(1); | |
| 300 | echo "."; | |
| 301 | sleep(1); | |
| 302 | echo ".\n"; | |
| 303 | $file = file_get_contents($namefile) or die ("File not found!\n");
| |
| 304 | $socks = explode("\r\n",$file);
| |
| 305 | $total = count($socks); | |
| 306 | echo "Total socks: ".$total."\n"; | |
| 307 | ||
| 308 | foreach ($socks as $value) {
| |
| 309 | instagram_account_creator_like($value, $link); | |
| 310 | } | |
| 311 | } | |
| 312 | ||
| 313 | ?> |