Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<? goto bNldK; bNldK: $servername = "localhost"; goto ZHpMc; HbN95: function update_user..

Decoded Output download

<?   goto bNldK; bNldK: $servername = "localhost"; goto ZHpMc; HbN95: function update_user_balance($user_id, $currency, $reward, $conn) { $current_balance = get_user_balance($user_id, $conn); if (!isset($current_balance[$currency])) { $current_balance[$currency] = 0; } $current_balance[$currency] += $reward; $balance_json = json_encode($current_balance); $stmt = $conn->prepare("UPDATE users SET balance = ? WHERE id = ?"); $stmt->bind_param("si", $balance_json, $user_id); $stmt->execute(); $stmt->close(); } goto bAOYD; VIZn2: if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } goto HbN95; z6S7P: $password = "skycry51_kd02@"; goto GBzfw; uXQ68: $conn = new mysqli($servername, $username, $password, $dbname); goto VIZn2; ZHpMc: $username = "skycry51_kd02"; goto z6S7P; ykLBd: process_request(); goto euf1B; bAOYD: function get_user_balance($user_id, $conn) { $stmt = $conn->prepare("SELECT balance FROM users WHERE id = ?"); $stmt->bind_param("i", $user_id); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); $stmt->close(); if ($row && $row["balance"]) { return json_decode($row["balance"], true); } return array(); } goto T_FVx; euf1B: $conn->close(); goto ruSW0; T_FVx: function process_request() { $secret = "af825473570cf78d34add65183694ffe"; $subId = isset($_REQUEST["subId"]) ? $_REQUEST["subId"] : null; $transId = isset($_REQUEST["transId"]) ? $_REQUEST["transId"] : null; $reward = isset($_REQUEST["reward"]) ? $_REQUEST["reward"] : null; $signature = isset($_REQUEST["signature"]) ? $_REQUEST["signature"] : null; if (!$subId || !$transId || !$reward || !$signature) { echo "ERROR: Missing parameters"; return; } if (md5($subId . $transId . $reward . $secret) != $signature) { echo "ERROR: Signature doesn't match"; return; } $reward = $reward / 10000; $reward = $reward * 100000000; $currency = "USDT"; global $conn; update_user_balance($subId, $currency, $reward, $conn); echo "ok"; } goto ykLBd; GBzfw: $dbname = "skycry51_kd02"; goto uXQ68; ruSW0:   
 ?>

Did this file decode correctly?

Original Code

<?   goto bNldK; bNldK: $servername = "localhost"; goto ZHpMc; HbN95: function update_user_balance($user_id, $currency, $reward, $conn) { $current_balance = get_user_balance($user_id, $conn); if (!isset($current_balance[$currency])) { $current_balance[$currency] = 0; } $current_balance[$currency] += $reward; $balance_json = json_encode($current_balance); $stmt = $conn->prepare("UPDATE users SET balance = ? WHERE id = ?"); $stmt->bind_param("si", $balance_json, $user_id); $stmt->execute(); $stmt->close(); } goto bAOYD; VIZn2: if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } goto HbN95; z6S7P: $password = "skycry51_kd02@"; goto GBzfw; uXQ68: $conn = new mysqli($servername, $username, $password, $dbname); goto VIZn2; ZHpMc: $username = "skycry51_kd02"; goto z6S7P; ykLBd: process_request(); goto euf1B; bAOYD: function get_user_balance($user_id, $conn) { $stmt = $conn->prepare("SELECT balance FROM users WHERE id = ?"); $stmt->bind_param("i", $user_id); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); $stmt->close(); if ($row && $row["balance"]) { return json_decode($row["balance"], true); } return array(); } goto T_FVx; euf1B: $conn->close(); goto ruSW0; T_FVx: function process_request() { $secret = "af825473570cf78d34add65183694ffe"; $subId = isset($_REQUEST["subId"]) ? $_REQUEST["subId"] : null; $transId = isset($_REQUEST["transId"]) ? $_REQUEST["transId"] : null; $reward = isset($_REQUEST["reward"]) ? $_REQUEST["reward"] : null; $signature = isset($_REQUEST["signature"]) ? $_REQUEST["signature"] : null; if (!$subId || !$transId || !$reward || !$signature) { echo "ERROR: Missing parameters"; return; } if (md5($subId . $transId . $reward . $secret) != $signature) { echo "ERROR: Signature doesn't match"; return; } $reward = $reward / 10000; $reward = $reward * 100000000; $currency = "USDT"; global $conn; update_user_balance($subId, $currency, $reward, $conn); echo "ok"; } goto ykLBd; GBzfw: $dbname = "skycry51_kd02"; goto uXQ68; ruSW0:  

Function Calls

None

Variables

None

Stats

MD5 70973cafaaa6ba5df8b8a757dc5f779b
Eval Count 0
Decode Time 42 ms