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

Signing you up...

Thank you for signing up!

PHP Decode

<?php session_start(); header("Content-type: text/html; charset=utf8"); include "config..

Decoded Output download

<?php 
session_start(); 
header("Content-type: text/html; charset=utf8"); 
include "config.php"; 
//  
if (isset($_POST) && isset($_POST['money'])) { 
    @$money = filter_input(INPUT_POST, 'money', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); 
 
    if (empty($_SESSION['xy_name'])) { 
        echo "<script> alert('');window.location.href='admin.php';</script>"; 
        exit; 
    } 
 
    if (empty($money)) { 
        echo "<script> alert('');window.location.href='admin.php';</script>"; 
        exit; 
    } 
 
    //  
    $link = mysqli_connect($config['db_host'], $config['db_user'], $config['db_pass'], 'admin') or die(json_encode(array('code'=>81,'info'=>''))); 
    mysqli_set_charset($link, 'utf8'); 
 
    $sql = "SELECT `name` AS userid FROM `xy` WHERE `name`='{$_SESSION['xy_name']}'"; 
    $row = mysqli_fetch_assoc(mysqli_query($link, $sql)); 
 
    if (!$row || empty($row['userid'])) { 
        echo "<script> alert('');location.reload();</script>"; 
        mysqli_close($link); 
        exit; 
    } 
     
    $userid = $row['userid']; 
    $server_ip = '192.168.200.100'; // IP 
 
    //  
    exec("/home/wc_trunk/addgold_auto {$userid} {$money} {$server_ip}", $output, $status); 
 
    if ($status === 0) { 
        echo "<script> alert(' {$money} ');window.location.href='admin.php';</script>"; 
    } else { 
        echo "<script> alert(' {$money} ');window.location.href='admin.php';</script>"; 
    } 
 
    //  
    mysqli_close($link); 
} 
 
?>

Did this file decode correctly?

Original Code

<?php
session_start();
header("Content-type: text/html; charset=utf8");
include "config.php";
// 
if (isset($_POST) && isset($_POST['money'])) {
    @$money = filter_input(INPUT_POST, 'money', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);

    if (empty($_SESSION['xy_name'])) {
        echo "<script> alert('');window.location.href='admin.php';</script>";
        exit;
    }

    if (empty($money)) {
        echo "<script> alert('');window.location.href='admin.php';</script>";
        exit;
    }

    // 
    $link = mysqli_connect($config['db_host'], $config['db_user'], $config['db_pass'], 'admin') or die(json_encode(array('code'=>81,'info'=>'')));
    mysqli_set_charset($link, 'utf8');

    $sql = "SELECT `name` AS userid FROM `xy` WHERE `name`='{$_SESSION['xy_name']}'";
    $row = mysqli_fetch_assoc(mysqli_query($link, $sql));

    if (!$row || empty($row['userid'])) {
        echo "<script> alert('');location.reload();</script>";
        mysqli_close($link);
        exit;
    }
    
    $userid = $row['userid'];
    $server_ip = '192.168.200.100'; // IP

    // 
    exec("/home/wc_trunk/addgold_auto {$userid} {$money} {$server_ip}", $output, $status);

    if ($status === 0) {
        echo "<script> alert(' {$money} ');window.location.href='admin.php';</script>";
    } else {
        echo "<script> alert(' {$money} ');window.location.href='admin.php';</script>";
    }

    // 
    mysqli_close($link);
}

?>

Function Calls

header 1
session_start 1

Variables

None

Stats

MD5 c9dd1df3fe37633474fa15fa6766dbe1
Eval Count 0
Decode Time 61 ms