Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.5.0.0
- * @ Author : DeZender
- * @ Release on : 22.06.2018
- * @ Official site : http://DeZender.Net
- *
- */
- $type = (!empty($_GET['gatepay']) ? $_GET['gatepay'] : '');
- $action = (!empty($_GET['action']) ? $_GET['action'] : '');
- $root_dir = $_SERVER['DOCUMENT_ROOT'];
- $ketnoi = mysqli_connect($dbhost, $dbusername, $dbpassword, $dbname) or exit('Kiem tra lai thong tin mysql');
- mysqli_set_charset($ketnoi, 'utf8');
- try {
- $db = new PDO('mysql:host=localhost;dbname=' . $dbname, $dbusername, $dbpassword);
- $db->exec('set names utf8');
- } catch (PDOException $e) {
- exit('Loi ket noi');
- }
- if (file_exists($root_dir . '/key_gatepay.txt')) {
- $getkey = fopen($root_dir . '/key_gatepay.txt', 'r');
- $key = fread($getkey, filesize($root_dir . '/key_gatepay.txt'));
- $data_send = array('key' => $key);
- $curl = curl_init();
- curl_setopt_array($curl, array(CURLOPT_URL => 'https://api.gatepay.vn/api/license/active-license', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode($data_send), CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Accept' => 'application/json')));
- $response = curl_exec($curl);
- curl_close($curl);
- $data = json_decode($response, true);
- if ($data['status'] == 200) {
- function get_rkey($length)
- {
- $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $size = strlen($chars);
- $str = '';
- for ($i = 0; $i < $length; $i++) {
- $str .= $chars[rand(0, $size - 1)];
- }
- return $str;
- }
- function encryptDecrypt($data, $key, $mode = 'ENCRYPT')
- {
- if (strlen($key) < 32) {
- $key = str_pad($key, 32, 'x');
- }
- $key = substr($key, 0, 32);
- $iv = pack('C*', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- if ($mode === 'ENCRYPT') {
- return base64_encode(openssl_encrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv));
- }
- return openssl_decrypt(base64_decode($data), 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
- }
- function get_microtime()
- {
- return floor(microtime(true) * 1000);
- }
- function get_checksum($data, $type)
- {
- $checkSumSyntax = $data['phone'] . get_microtime() . '000000' . $type . get_microtime() / 1000000000000 . 'E12';
- return encryptDecrypt($checkSumSyntax, encryptDecrypt($data['setupkey'], $data['ohash'], 'DECRYPT'));
- }
- function get_pHash($data)
- {
- $pHashSyntax = $data['imei'] . '|' . $data['password'];
- return encryptDecrypt($pHashSyntax, encryptDecrypt($data['setupkey'], $data['ohash'], 'DECRYPT'));
- ............................................................................
- ..............................................
- .................
Add Comment
Please, Sign In to add comment