fork download
  1. <?
  2.  
  3. /*
  4.  
  5.   by SERJ.WS
  6.  
  7.   $AES_KEY и $TOKEN берем в
  8.  
  9.   /data/data/app.source.getcontact/shared_prefs/GetContactSettingsPref.xml
  10.  
  11. */
  12.  
  13.  
  14. $AES_KEY = '8c93b9b782b120af99ea274f745d2f4b43d89aa8794ccba97c190c8fccbaXXXX';
  15. $TOKEN = 'hagoje90c9d2e59aaa7c31cdb71a643f8346af863a423d90c3cceb6XXXX';
  16.  
  17. $key = '2Wq7)qkX~cp7)H|n_tc&o+:G_USN3/-uIi~>M+c ;Oq]E{t9)RC_5|lhAA_Qq%_4';
  18. $PRIVATE_KEY = 2615678;
  19. $time = time();
  20.  
  21. $number="+77073151515";
  22.  
  23.  
  24.  
  25. function decrypt($key, $garble) {
  26.  
  27. return openssl_decrypt(
  28. base64_decode($garble),
  29. "aes-256-ecb",
  30. $key,
  31. OPENSSL_RAW_DATA
  32. );
  33.  
  34. }
  35.  
  36.  
  37. function encrypt($key, $garble) {
  38.  
  39. $method = 'AES-256-ECB';
  40. $ivSize = openssl_cipher_iv_length($method);
  41. $iv = openssl_random_pseudo_bytes($ivSize);
  42.  
  43. return openssl_encrypt(
  44. $garble,
  45. "aes-256-ecb",
  46. $key,
  47. OPENSSL_RAW_DATA
  48. );
  49.  
  50. }
  51.  
  52.  
  53.  
  54. function Send_Post($post_url, $post_data,$signature)
  55. { global $TOKEN,$time;
  56.  
  57. $ch = curl_init();
  58. curl_setopt($ch, CURLOPT_URL, $post_url);
  59. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  60.  
  61. if ($post_data!=""){
  62. curl_setopt($ch, CURLOPT_POST, 1);
  63. curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
  64. }
  65.  
  66. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  67.  
  68. curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  69. "X-App-Version: 4.9.1",
  70. "X-Token: ".$TOKEN,
  71. "X-Os: android 5.0",
  72. "X-Client-Device-Id: 14130e29cebe9c39",
  73. "Content-Type: application/json; charset=utf-8",
  74. "Accept-Encoding: deflate",
  75. "X-Req-Timestamp: ".$time,
  76. "X-Req-Signature: ".$signature,
  77. "X-Encrypted: 1"));
  78.  
  79. curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
  80.  
  81. $data = curl_exec($ch);
  82. curl_close($ch);
  83.  
  84. return $data;
  85. }
  86.  
  87.  
  88.  
  89.  
  90. function GetByPhone ($phone) {
  91.  
  92. global $time, $TOKEN, $key, $AES_KEY;
  93.  
  94. $req='{"countryCode":"RU","source":"search","token":"'.$TOKEN.'","phoneNumber":"'.$phone.'"}';
  95.  
  96. $string = ($time.'-'.$req);
  97.  
  98. $signature= base64_encode(hash_hmac ( 'sha256' , $string , $key , true ));
  99.  
  100. $crypt_data=base64_encode(encrypt(hex2bin($AES_KEY), $req));
  101.  
  102. $zprs =Send_Post("https://p...content-available-to-author-only...s.com/v2.5/search", '{"data":"'.$crypt_data.'"}',$signature);
  103.  
  104. $zprs=json_decode($zprs);
  105.  
  106. $time = time();
  107.  
  108. return $zprs->data;
  109.  
  110. }
  111.  
  112.  
  113.  
  114. function GetByPhoneTags ($phone) {
  115.  
  116. global $time, $TOKEN, $key, $AES_KEY;
  117.  
  118. $req='{"countryCode":"RU","source":"details","token":"'.$TOKEN.'","phoneNumber":"'.$phone.'"}';
  119.  
  120. $string = ($time.'-'.$req);
  121.  
  122. $signature= base64_encode(hash_hmac ( 'sha256' , $string , $key , true ));
  123.  
  124. $crypt_data=base64_encode(encrypt(hex2bin($AES_KEY), $req));
  125.  
  126. $zprs =Send_Post("https://p...content-available-to-author-only...s.com/v2.5/number-detail", '{"data":"'.$crypt_data.'"}',$signature);
  127.  
  128. $zprs=json_decode($zprs);
  129.  
  130. return $zprs->data;
  131.  
  132. }
  133.  
  134.  
  135.  
  136. print_r(json_decode(decrypt(hex2bin($AES_KEY), GetByPhone($number))));
  137. echo "\n\n\n";
  138. print_r(json_decode(decrypt(hex2bin($AES_KEY), GetByPhoneTags($number))));
  139.  
  140.  
  141.  
  142. ?>
Success #stdin #stdout 0.03s 25540KB
stdin
Standard input is empty
stdout
<?

/*

     by  SERJ.WS
    
    $AES_KEY и $TOKEN берем в
    
    /data/data/app.source.getcontact/shared_prefs/GetContactSettingsPref.xml

*/


 $AES_KEY = '8c93b9b782b120af99ea274f745d2f4b43d89aa8794ccba97c190c8fccbaXXXX';
 $TOKEN = 'hagoje90c9d2e59aaa7c31cdb71a643f8346af863a423d90c3cceb6XXXX';

 $key = '2Wq7)qkX~cp7)H|n_tc&o+:G_USN3/-uIi~>M+c ;Oq]E{t9)RC_5|lhAA_Qq%_4';
 $PRIVATE_KEY = 2615678;
 $time = time();

 $number="+77073151515";



function decrypt($key, $garble) {
   
   return openssl_decrypt(
    base64_decode($garble),
    "aes-256-ecb",
    $key,
    OPENSSL_RAW_DATA
);

}


function encrypt($key, $garble) {
   
 $method = 'AES-256-ECB';
    $ivSize = openssl_cipher_iv_length($method);
    $iv = openssl_random_pseudo_bytes($ivSize);
   
   return openssl_encrypt(
    $garble,
    "aes-256-ecb",
    $key,
    OPENSSL_RAW_DATA
);

}



function Send_Post($post_url, $post_data,$signature)
 { global $TOKEN,$time;

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $post_url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

 if ($post_data!=""){
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
  }
  
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

 curl_setopt($ch, CURLOPT_HTTPHEADER, array(
 "X-App-Version: 4.9.1",
 "X-Token: ".$TOKEN,
 "X-Os: android 5.0",
 "X-Client-Device-Id: 14130e29cebe9c39",
 "Content-Type: application/json; charset=utf-8",
 "Accept-Encoding: deflate",
 "X-Req-Timestamp: ".$time,
 "X-Req-Signature: ".$signature,
 "X-Encrypted: 1"));

 curl_setopt ($ch, CURLOPT_TIMEOUT, 60);

 $data = curl_exec($ch);
 curl_close($ch);

 return $data;
}




function GetByPhone ($phone) {

 global $time, $TOKEN, $key, $AES_KEY;

 $req='{"countryCode":"RU","source":"search","token":"'.$TOKEN.'","phoneNumber":"'.$phone.'"}';

 $string = ($time.'-'.$req);

 $signature= base64_encode(hash_hmac ( 'sha256' , $string , $key , true ));

 $crypt_data=base64_encode(encrypt(hex2bin($AES_KEY), $req));

 $zprs =Send_Post("https://p...content-available-to-author-only...s.com/v2.5/search", '{"data":"'.$crypt_data.'"}',$signature);

 $zprs=json_decode($zprs);

 $time = time();

 return $zprs->data;

 }



 function GetByPhoneTags ($phone) {

 global $time, $TOKEN, $key, $AES_KEY;

 $req='{"countryCode":"RU","source":"details","token":"'.$TOKEN.'","phoneNumber":"'.$phone.'"}';

 $string = ($time.'-'.$req);

 $signature= base64_encode(hash_hmac ( 'sha256' , $string , $key , true ));

 $crypt_data=base64_encode(encrypt(hex2bin($AES_KEY), $req));

 $zprs =Send_Post("https://p...content-available-to-author-only...s.com/v2.5/number-detail", '{"data":"'.$crypt_data.'"}',$signature);

 $zprs=json_decode($zprs);

 return $zprs->data;

 }



 print_r(json_decode(decrypt(hex2bin($AES_KEY), GetByPhone($number))));
 echo "\n\n\n";
 print_r(json_decode(decrypt(hex2bin($AES_KEY), GetByPhoneTags($number))));



?>