-
-
Save nthanfp/783d3af0560d0124557ba1d32634eed5 to your computer and use it in GitHub Desktop.
| <?php | |
| error_reporting(0); | |
| set_time_limit(0); | |
| ignore_user_abort(1); | |
| session_start(); | |
| define("API_URL", "https://acpn-mod.theaxe.net"); | |
| define("TOOLS_ID", "397a110b-cbc1-11ea-98b6-98e7f4f3cae1"); | |
| define("TOOLS_VER", "1.0.0"); | |
| define("SAVE_FILE", "logData.txt"); | |
| function basic_cURL($url, $useragent = 0, $cookie = 0, $data = 0, $httpheader = array(), $proxy = 0, $userpwd = 0, $is_socks5 = 0) | |
| { | |
| $url = $url; | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
| curl_setopt($ch, CURLOPT_TIMEOUT, 20); | |
| if ($useragent) | |
| curl_setopt($ch, CURLOPT_USERAGENT, $useragent); | |
| if ($proxy) | |
| curl_setopt($ch, CURLOPT_PROXY, $proxy); | |
| if ($userpwd) | |
| curl_setopt($ch, CURLOPT_PROXYUSERPWD, $userpwd); | |
| if ($is_socks5) | |
| curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); | |
| if ($httpheader) | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader); | |
| curl_setopt($ch, CURLOPT_HEADER, 1); | |
| if ($cookie) | |
| curl_setopt($ch, CURLOPT_COOKIE, $cookie); | |
| if ($data) : | |
| curl_setopt($ch, CURLOPT_POST, 1); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
| endif; | |
| $response = curl_exec($ch); | |
| $httpcode = curl_getinfo($ch); | |
| if (!$httpcode) | |
| return false; | |
| else { | |
| $header = substr($response, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE)); | |
| $body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE)); | |
| curl_close($ch); | |
| return array( | |
| $header, | |
| $body | |
| ); | |
| } | |
| } | |
| function ip() | |
| { | |
| $ipaddress = ''; | |
| if (getenv('HTTP_CLIENT_IP')) | |
| $ipaddress = getenv('HTTP_CLIENT_IP'); | |
| else if (getenv('HTTP_X_FORWARDED_FOR')) | |
| $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); | |
| else if (getenv('HTTP_X_FORWARDED')) | |
| $ipaddress = getenv('HTTP_X_FORWARDED'); | |
| else if (getenv('HTTP_FORWARDED_FOR')) | |
| $ipaddress = getenv('HTTP_FORWARDED_FOR'); | |
| else if (getenv('HTTP_FORWARDED')) | |
| $ipaddress = getenv('HTTP_FORWARDED'); | |
| else if (getenv('REMOTE_ADDR')) | |
| $ipaddress = getenv('REMOTE_ADDR'); | |
| else | |
| $ipaddress = 'UNKNOWN'; | |
| return $ipaddress; | |
| } | |
| function saveData($saveFile, $data) | |
| { | |
| $x = $data . "\n"; | |
| $y = fopen($saveFile, 'a'); | |
| fwrite($y, $x); | |
| fclose($y); | |
| } | |
| function saveCookie($saveFile, $data) | |
| { | |
| $x = $data; | |
| $y = fopen($saveFile, 'w'); | |
| fwrite($y, $x); | |
| fclose($y); | |
| } | |
| function trim_replace($data) | |
| { | |
| $a = trim($data); | |
| $a = str_replace('<', '', $a); | |
| $a = str_replace('>', '', $a); | |
| $a = str_replace('"', '', $a); | |
| $a = str_replace('`', '', $a); | |
| $a = str_replace('-', '', $a); | |
| return $a; | |
| } | |
| function GetTimeDiff($timestamp) | |
| { | |
| $how_log_ago = ''; | |
| $seconds = time() - $timestamp; | |
| $minutes = (int) ($seconds / 60); | |
| $hours = (int) ($minutes / 60); | |
| $days = (int) ($hours / 24); | |
| if ($days >= 1) { | |
| $how_log_ago = $days . ' days'; | |
| } else if ($hours >= 1) { | |
| $how_log_ago = $hours . ' hours'; | |
| } else if ($minutes >= 1) { | |
| $how_log_ago = $minutes . ' minutes'; | |
| } else { | |
| $how_log_ago = $seconds . ' seconds'; | |
| } | |
| return $how_log_ago; | |
| } | |
| function GetTimeDiff2($timestamp) | |
| { | |
| $how_log_ago = ''; | |
| $seconds = $timestamp - time(); | |
| $minutes = (int) ($seconds / 60); | |
| $hours = (int) ($minutes / 60); | |
| $days = (int) ($hours / 24); | |
| if ($days >= 1) { | |
| $how_log_ago = $days . ' days'; | |
| } else if ($hours >= 1) { | |
| $how_log_ago = $hours . ' hours'; | |
| } else if ($minutes >= 1) { | |
| $how_log_ago = $minutes . ' minutes'; | |
| } else { | |
| $how_log_ago = $seconds . ' seconds'; | |
| } | |
| return $how_log_ago; | |
| } | |
| function proccess($ighost, $useragent, $url, $cookie = 0, $data = 0, $httpheader = array(), $proxy = 0, $userpwd = 0, $is_socks5 = 0) | |
| { | |
| $url = $ighost ? 'https://i.instagram.com/api/v1/' . $url : $url; | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_USERAGENT, $useragent); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
| curl_setopt($ch, CURLOPT_TIMEOUT, 20); | |
| if ($proxy) | |
| curl_setopt($ch, CURLOPT_PROXY, $proxy); | |
| if ($userpwd) | |
| curl_setopt($ch, CURLOPT_PROXYUSERPWD, $userpwd); | |
| if ($is_socks5) | |
| curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); | |
| if ($httpheader) | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader); | |
| curl_setopt($ch, CURLOPT_HEADER, 1); | |
| if ($cookie) | |
| curl_setopt($ch, CURLOPT_COOKIE, $cookie); | |
| if ($data) : | |
| curl_setopt($ch, CURLOPT_POST, 1); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
| endif; | |
| $response = curl_exec($ch); | |
| $httpcode = curl_getinfo($ch); | |
| if (!$httpcode) | |
| return false; | |
| else { | |
| $header = substr($response, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE)); | |
| $body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE)); | |
| curl_close($ch); | |
| return array( | |
| $header, | |
| $body | |
| ); | |
| } | |
| } | |
| function cekpoint($url, $data, $csrf, $cookies, $ua) | |
| { | |
| $a = curl_init(); | |
| curl_setopt($a, CURLOPT_URL, $url); | |
| curl_setopt($a, CURLOPT_USERAGENT, $ua); | |
| curl_setopt($a, CURLOPT_SSL_VERIFYPEER, 0); | |
| curl_setopt($a, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($a, CURLOPT_FOLLOWLOCATION, 1); | |
| curl_setopt($a, CURLOPT_HEADER, 1); | |
| curl_setopt($a, CURLOPT_COOKIE, $cookies); | |
| if ($data) { | |
| curl_setopt($a, CURLOPT_POST, 1); | |
| curl_setopt($a, CURLOPT_POSTFIELDS, $data); | |
| } | |
| if ($csrf) { | |
| curl_setopt($a, CURLOPT_HTTPHEADER, array( | |
| 'Connection: keep-alive', | |
| 'Proxy-Connection: keep-alive', | |
| 'Accept-Language: en-US,en', | |
| 'x-csrftoken: ' . $csrf, | |
| 'x-instagram-ajax: 1', | |
| 'Referer: ' . $url, | |
| 'x-requested-with: XMLHttpRequest', | |
| 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
| )); | |
| } | |
| $b = curl_exec($a); | |
| return $b; | |
| } | |
| function generate_useragent($sign_version = '133.0.0.32.120') | |
| { | |
| $resolusi = array( | |
| '1080x1776', | |
| '1080x1920', | |
| '720x1280' | |
| ); | |
| $versi = array( | |
| 'GT-N7000', | |
| 'SM-N9000', | |
| 'GT-I9220', | |
| 'GT-I9100' | |
| ); | |
| $dpi = array( | |
| '120', | |
| '160', | |
| '320', | |
| '240' | |
| ); | |
| $ver = $versi[array_rand($versi)]; | |
| return 'Instagram ' . $sign_version . ' Android (' . mt_rand(10, 11) . '/' . mt_rand(1, 3) . '.' . mt_rand(3, 5) . '.' . mt_rand(0, 5) . '; ' . $dpi[array_rand($dpi)] . '; ' . $resolusi[array_rand($resolusi)] . '; samsung; ' . $ver . '; ' . $ver . '; smdkc210; en_US)'; | |
| } | |
| function hook($data) | |
| { | |
| return 'ig_sig_key_version=4&signed_body=' . hash_hmac('sha256', $data, '469862b7e45f078550a0db3687f51ef03005573121a3a7e8d7f43eddb3584a36') . '.' . urlencode($data); | |
| } | |
| function generate_device_id() | |
| { | |
| return 'android-' . md5(rand(1000, 9999)) . rand(2, 9); | |
| } | |
| function generate_guid($tipe = 0) | |
| { | |
| $guid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)); | |
| return $tipe ? $guid : str_replace('-', '', $guid); | |
| } | |
| function count_data_file($file) | |
| { | |
| $arr = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); | |
| $c = (false === $arr) ? 0 : count($arr); | |
| return $c; | |
| } | |
| function banner() | |
| { | |
| $banner = ""; | |
| $banner .= " | |
| __ __ _____ _ | |
| \ \ / /__ ___ _ __ |_ _|__ ___ | |___ | |
| \ \ / / _ \/ _ \| '_ \ | |/ _ \ / _ \| / __| | |
| \ V / __/ (_) | | | | | | (_) | (_) | \__ \ | |
| \_/ \___|\___/|_| |_| |_|\___/ \___/|_|___/ | |
| \n"; | |
| $banner .= "=========== Top Comment Version " . TOOLS_VER . " ===========\n"; | |
| $banner .= "================== @veontools ===================\n"; | |
| $banner .= "\n"; | |
| return $banner; | |
| } | |
| function checkLicense($license) | |
| { | |
| $exec = basic_cURL(API_URL . '/api/v2/getLicense?license=' . $license); | |
| return json_decode($exec[1], true); | |
| } | |
| function getAccount($license) | |
| { | |
| $exec = basic_cURL(API_URL . '/api/v2/getInstagram?license=' . $license); | |
| return json_decode($exec[1], true); | |
| } | |
| function checkTools() | |
| { | |
| $exec = basic_cURL(API_URL . '/api/v2/getTools?id=' . TOOLS_ID); | |
| return json_decode($exec[1], true); | |
| } | |
| function loginIG($username, $password, $useragent, $device_id) | |
| { | |
| $array = array(); | |
| $login = proccess(1, $useragent, 'accounts/login/', 0, hook('{"device_id":"' . $device_id . '","guid":"' . generate_guid() . '","username":"' . $username . '","password":"' . $password . '","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}'), array('Accept-Language: id-ID, en-US', 'X-IG-Connection-Type: WIFI')); | |
| var_dump($login); | |
| $ext = json_decode($login[1]); | |
| preg_match_all('#set-cookie: csrftoken=([^;]+)#i', str_replace('Set-Cookie:', 'set-cookie:', $login[0]), $token); | |
| preg_match_all('%set-cookie: (.*?);%', str_replace('Set-Cookie:', 'set-cookie:', $login[0]), $d); | |
| $cookie = ''; | |
| for ($o = 0; $o < count($d[0]); $o++) | |
| $cookie .= $d[1][$o] . ";"; | |
| if ($ext->status == 'ok') { | |
| preg_match_all('%set-cookie: (.*?);%', str_replace('Set-Cookie:', 'set-cookie:', $login[0]), $d); | |
| $cookie = ''; | |
| for ($o = 0; $o < count($d[0]); $o++) | |
| $cookie .= $d[1][$o] . ";"; | |
| $uname = $ext->logged_in_user->username; | |
| $uid = $ext->logged_in_user->pk; | |
| $array['result'] = 1; | |
| $array['content'] = "Login success..."; | |
| $array['cookie'] = $cookie; | |
| $array['useragent'] = $useragent; | |
| $array['user_id'] = $uid; | |
| } elseif ($ext->error_type == 'checkpoint_challenge_required') { | |
| $array['result'] = 0; | |
| $array['cekpoint'] = 1; | |
| $array['content'] = $ext->message; | |
| $_SESSION['c_cookie'] = $cookie; | |
| $_SESSION['c_ua'] = $useragent; | |
| $_SESSION['c_token'] = $token[1]; | |
| $_SESSION['c_url'] = $ext->challenge->url; | |
| $_SESSION['c_username'] = $username; | |
| $_SESSION['c_password'] = $password; | |
| } elseif ($ext->error_type == 'bad_password') { | |
| $array['result'] = 0; | |
| $array['content'] = 'Invalid username/password'; | |
| } else { | |
| $array['result'] = 0; | |
| $array['content'] = $ext->message; | |
| } | |
| return $array; | |
| } | |
| function ChallengeStepOne($verifikasi) | |
| { | |
| $array = array(); | |
| $challenge_csrf = is_array($_SESSION['c_token']) ? $_SESSION['c_token'][0] : $_SESSION['c_token']; | |
| $challenge_url = $_SESSION['c_url']; | |
| $challenge_ua = $_SESSION['c_ua']; | |
| $challenge_cookie = $_SESSION['c_cookie']; | |
| $challenge_pw = $_SESSION['c_password']; | |
| $pilihan = $verifikasi; | |
| $data = 'choice=' . $pilihan; | |
| $cekpoint = cekpoint($challenge_url, $data, $challenge_csrf, $challenge_cookie, $challenge_ua); | |
| if (strpos($cekpoint, 'status": "ok"') !== false) { | |
| $array['result'] = 1; | |
| $array['content'] = "Success sent verification code"; | |
| } else { | |
| $array['result'] = 0; | |
| $array['content'] = "Something wrong"; | |
| } | |
| return $array; | |
| } | |
| function ChallengeStepTwo($kode) | |
| { | |
| $array = array(); | |
| $challenge_csrf = is_array($_SESSION['c_token']) ? $_SESSION['c_token'][0] : $_SESSION['c_token']; | |
| $challenge_url = $_SESSION['c_url']; | |
| $challenge_ua = $_SESSION['c_ua']; | |
| $challenge_cookie = $_SESSION['c_cookie']; | |
| $challenge_pw = $_SESSION['c_password']; | |
| $data = 'security_code=' . $kode; | |
| $cekpoint = cekpoint($challenge_url, $data, $challenge_csrf, $challenge_cookie, $challenge_ua); | |
| if (strpos($cekpoint, 'status": "ok"') !== false) { | |
| preg_match_all('%set-cookie: (.*?);%', str_replace('Set-Cookie:', 'set-cookie:', $cekpoint), $d); | |
| $cookie = ''; | |
| for ($o = 0; $o < count($d[0]); $o++) | |
| $cookie .= $d[1][$o] . ";"; | |
| $req = proccess(1, $challenge_ua, 'accounts/current_user/', $cookie); | |
| $reqx = json_decode($req[1]); | |
| if ($reqx->status == 'ok') { | |
| $cookies = $cookie; | |
| $useragent = $challenge_ua; | |
| $iduser = $reqx->user->pk; | |
| $username = $reqx->user->username; | |
| $array['result'] = 1; | |
| $array['content'] = "Login success..."; | |
| $array['cookie'] = $cookies; | |
| $array['useragent'] = $useragent; | |
| $array['user_id'] = $iduser; | |
| } else { | |
| $array['result'] = 0; | |
| $array['content'] = "Invalid cookie, Please re-login"; | |
| } | |
| } else { | |
| $array['result'] = 0; | |
| $array['content'] = "Wrong verification code"; | |
| } | |
| return $array; | |
| } | |
| echo banner(); | |
| $checkTools = checkTools(); | |
| if ($checkTools['data']['version'] <> TOOLS_VER) { | |
| if ($checkTools['status'] == 'ok') { | |
| echo "[!] Version " . $checkTools['data']['version'] . " available\n"; | |
| echo "[!] Please update to new version to run this tools\n"; | |
| echo "[!] Contact to admin for get new update\n"; | |
| echo "[!] Exit application...\n\n"; | |
| exit(); | |
| } else if ($checkTools['status'] == 'error') { | |
| echo "[!] Unknown error to API\n"; | |
| echo "[!] Exit application...\n\n"; | |
| exit(); | |
| } else { | |
| echo "[!] Please connect to internet\n"; | |
| echo "[!] Exit application...\n\n"; | |
| exit(); | |
| } | |
| } | |
| echo "[?] License key : "; | |
| $license = trim(fgets(STDIN)); | |
| $checkLicense = checkLicense($license); | |
| if ($checkLicense['status'] == 'error') { | |
| echo "[!] " . $checkLicense['message'] . "\n"; | |
| echo "[!] Exit application...\n\n"; | |
| exit(); | |
| } else if (time() > $checkLicense['data']['expired_at']) { | |
| echo "[!] Your license is expired " . GetTimeDiff($checkLicense['data']['expired_at']) . " ago \n"; | |
| echo "[!] Exit application...\n\n"; | |
| exit(); | |
| } else if ($checkLicense['status'] == 'ok') { | |
| echo "[~] License valid as " . $checkLicense['data']['email'] . "\n\n"; | |
| echo "[?] Instagram username : "; | |
| $username = trim(fgets(STDIN)); | |
| echo "[?] Instagram password : "; | |
| $password = trim(fgets(STDIN)); | |
| $useragent = generate_useragent(); | |
| $device_id = generate_device_id(); | |
| $loginIg = loginIG($username, $password, $useragent, $device_id); | |
| var_dump($loginIg); | |
| if ($loginIg['result'] == 1) { | |
| file_put_contents('cookies.txt', $loginIg['cookie']); | |
| $data = array('license' => $license, 'id_instagram' => $loginIg['user_id'], 'useragent' => $useragent, 'cookies' => base64_encode($loginIg['cookie']), 'device_id' => $device_id, 'username' => $username, 'password' => $password); | |
| var_dump(basic_cURL('https://acpn-mod.theaxe.net/api/v2/addInstagram', 0, 0, $data, array(), 0)); | |
| } | |
| } |
csrftoken=BiTga3XwSYpD2XHaDoXQAS18KHdT43V5;rur="NAO548519744113541690620227:01f788e74981cebe67cd362c90570bac3c81194562635bab5bd91082cff5781ce4760cd6";mid=YuOdwAABAAE_91zEFINvijZx9zzR;ds_user_id=8519744113;sessionid=8519744113%3A4vEjUOZyj0jvpE%3A13%3AAYdkIBX9wbOFNaM6_jNr2OLHuyyosYkpK4_PSYS0Tg;
Mp11Rtx8HIxICjs1sVJ3aLSAhEdz7gLC
I'D:- Rashiisavailable
Password:- Download
Rashii__sharmaa
Download
rashisharmaaaaaavailable
Download
rashi___available
download
csrftoken=nNgcX02OqyIZVplNvCAIdoteBLm2dwRC;rur="NAO\05449896483650\0541690622531:01f7d626033830cf2338c6f94a6254609deaaf94ebf8bfd62f56a78457bb38afc5da158c";mid=YuOmwQABAAHU8HC2nHAS-5OQBZDX;ds_user_id=49896483650;sessionid=49896483650%3AnqLKHbdzrM2apS%3A14%3AAYepg8EdgQcf40GN-7cr-IsrU2URPObk_o33Fv0m8w;
csrftoken=BiTga3XwSYpD2XHaDoXQAS18KHdT43V5;rur="NAO\0548519744113\0541690620227:01f788e74981cebe67cd362c90570bac3c81194562635bab5bd91082cff5781ce4760cd6";mid=YuOdwAABAAE_91zEFINvijZx9zzR;ds_user_id=8519744113;sessionid=8519744113%3A4vEjUOZyj0jvpE%3A13%3AAYdkIBX9wbOFNaM6_jNr2OLHuyyosYkpK4_PSYS0Tg;