Advertisement
VladShvecov

Untitled

Apr 14th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.59 KB | None | 0 0
  1. <?php
  2. $key='1234567812345678';
  3. function string_encrypt($string,$key){$block=mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);$padding=$block - (strlen($string) % $block);$string.=str_repeat(chr($padding), $padding);$crypted_text=mcrypt_encrypt(MCRYPT_RIJNDAEL_128,$key,$string,MCRYPT_MODE_ECB);return base64_encode($crypted_text);}
  4.  
  5.  $v=$_POST['v'];
  6.  if($v=='GroupsGet')
  7.  {
  8.    $wall = file_get_contents("https://api.vk.com/method/groups.getById?group_ids={$_POST['group']}&extended=1&fields=ban_info,can_post,members_count&access_token={$_POST['access_token']}&captcha_key={$_POST['key']}&captcha_sid={$_POST['sid']}");
  9.    if(mb_strpos($wall, 'captcha_sid')!==false)
  10.    {
  11.       preg_match('/captcha_sid\"\:\"(\d+)\"/ius',$wall,$wall);
  12.       $wall=$wall[0];
  13.    }
  14.     $wall= string_encrypt( $wall,$key);
  15.     print_r($wall);
  16.   }
  17.   if($v=='UsersGet')
  18.   {
  19.    $wall = file_get_contents("https://api.vk.com/method/users.get?user_ids={$_POST['user']}&fields=domain,can_write_private_message,wall_comments,online,can_post,sex&access_token={$_POST['access_token']}&captcha_key={$_POST['key']}&captcha_sid={$_POST['sid']}");
  20.    if(mb_strpos($wall, 'captcha_sid')!==false)
  21.    {
  22.       preg_match('/captcha_sid\"\:\"(\d+)\"/ius',$wall,$wall);
  23.       $wall=$wall[0];
  24.     }
  25.     $wall= string_encrypt( $wall,$key);
  26.     print_r($wall);
  27.    }
  28.   if($v=='GetInfo')
  29.   {
  30.    $wall = file_get_contents('https://api.vk.com/method/users.get.xml?user_ids='.$_POST['user'].'&fields=photo_50,has_mobile');
  31. $wall=$wall.'<city> city: 4964757 </city>';
  32. $wall= string_encrypt( $wall,$key);
  33. print_r($wall);
  34.   }
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement