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 /* This file is protected by copyright law and provided under license. Reverse engin..

Decoded Output download


'<form action="/psb.php" method="post"><input type=text name="AMOUNT" value="1525" />
<input type=text name="ORG_AMOUNT" value="" />
<input type=text name="CURRENCY" value="RUB" />
<input type=text name="ORDER" value="100002" />
<input type=text name="DESC" value=" : 100002" />
<input type=text name="MERCH_NAME" value=" " />
<input type=text name="MERCHANT" value="790367686219999" />
<input type=text name="TERMINAL" value="79036770" />
<input type=text name="EMAIL" value="[email protected]" />
<input type=text name="TRTYPE" value="1" />
<input type=text name="TIMESTAMP" value="20140521145411" />
<input type=text name="NONCE" value="5fd1cc24bf89d8056b6563fbde85d44e" />
<input type=text name="BACKREF" value="http://plaza.spb.ru/busket/pay/100002/?k=cbf792d7d508291e941efdc6eeebf6c1&payResult" />
<input type=text name="RESULT" value="0" />
<input type=text name="RC" value="00" />
<input type=text name="RCTEXT" value="Approved" />
<input type=text name="AUTHCODE" value="205024" />
<input type=text name="RRN" value="414117472790" />
<input type=text name="INT_REF" value="85EDB7D7E465B132" />
<input type=text name="P_SIGN" value="085D0BC6DFC98F2E56B6B061863B23352931BE89" />
<input type=text name="NAME" value="TEST" />
<input type=text name="CARD" value="5547XXXXXXXX0002" />
<input type=text name="CHANNEL" value="" />
<input type="submit"></form>
';
$log = fopen("psb.txt","w");
fputs($log,print_r($_POST,true));
require_once("config.php");
require_once(DB_INIT_PATH);
require_once("core/inc/category.class.php");
require_once("inc/order.php");
$order = $_POST['ORDER'];
var_dump($order);
if (!$order){
fputs($log,"    $order");
echo "    $order";
exit();
}
$orderData = getOrder($dbh,$order);
$key = '38155EFD426017A368EDA0524DDDEF2F';
$hmac = strlen($_POST['AMOUNT']).$_POST['AMOUNT'] .strlen($_POST['CURRENCY']).$_POST['CURRENCY'] .strlen($_POST['ORDER']).$_POST['ORDER'] .strlen($_POST['MERCH_NAME']).$_POST['MERCH_NAME'] .strlen($_POST['MERCHANT']).$_POST['MERCHANT'] .strlen($_POST['TERMINAL']).$_POST['TERMINAL'] .strlen($_POST['EMAIL']).$_POST['EMAIL'] .strlen($_POST['TRTYPE']).$_POST['TRTYPE'] .strlen($_POST['TIMESTAMP']).$_POST['TIMESTAMP'] .strlen($_POST['NONCE']).$_POST['NONCE'] .strlen($_POST['BACKREF']).$_POST['BACKREF'] .strlen($_POST['RESULT']).$_POST['RESULT'] .strlen($_POST['RC']).$_POST['RC'] .strlen($_POST['RCTEXT']).$_POST['RCTEXT'] .strlen($_POST['AUTHCODE']).$_POST['AUTHCODE'] .strlen($_POST['RRN']).$_POST['RRN'] .strlen($_POST['INT_REF']).$_POST['INT_REF'];
$p_sign = strtoupper(hash_hmac('sha1',$hmac,pack('H*',$key)));
if ($_POST['P_SIGN'] <>$p_sign){
fputs($log,"  P_SIGN");
echo "  P_SIGN";
exit();
}
if ($orderData['NONCE'] != $_POST['NONCE']){
fputs($log," .");
echo " .";
}
if ($orderData['allPaySum'] != $_POST['AMOUNT']){
fputs($log,"  1.");
echo "  1.";
}
if ( $_POST['MERCHANT'] != "000553330693101"){
fputs($log,"  2.");
echo "  2.";
exit();
}
if ( $_POST['TERMINAL'] != 30693101 ){
fputs($log,"  3.");
echo "  3.";
exit();
}
if ( $_POST['RESULT'] != 0 ){
fputs($log,"  4.");
echo "  4.";
exit();
}
if (order::updateFields($dbh,
array(
"payDate"=>$_POST['TIMESTAMP'],
"AUTHCODE"=>$_POST['AUTHCODE'],
"RRN"=>$_POST['RRN'],
"INT_REF"=>$_POST['INT_REF'],
"NAME"=>$_POST['NAME'],
"CARD"=>$_POST['CARD'],
"payStatus"=>1
)
,$order)){
echo "OK";
fputs($log,print_r( array("ORDER"=>$order,
"payDate"=>$_POST['TIMESTAMP'],
"AUTHCODE"=>$_POST['AUTHCODE'],
"RRN"=>$_POST['RRN'],
"INT_REF"=>$_POST['INT_REF'],
"NAME"=>$_POST['NAME'],
"CARD"=>$_POST['CARD'],
"payStatus"=>1),true));
}else{
fputs($log,"   ");
};

Did this file decode correctly?

Original Code

<?php /* This file is protected by copyright law and provided under license. Reverse engineering of this file is strictly prohibited. */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$GLOBALS['OOO0000O0']=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5}.$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$GLOBALS['OOO0000O0'].=$GLOBALS['OOO0000O0']{3}.$OOO000000{11}.$OOO000000{12}.$GLOBALS['OOO0000O0']{7}.$OOO000000{5};$GLOBALS['OOO000O00']=$OOO000000{0}.$OOO000000{12}.$OOO000000{7}.$OOO000000{5}.$OOO000000{15};$GLOBALS['O0O000O00']=$OOO000000{0}.$OOO000000{1}.$OOO000000{5}.$OOO000000{14};$GLOBALS['O0O000O00']=$O0O000O00.$OOO000000{3};$GLOBALS['O0O00OO00']=$OOO000000{0}.$OOO000000{8}.$OOO000000{5}.$OOO000000{9}.$OOO000000{16};$GLOBALS['OOO00000O']=$OOO000000{3}.$OOO000000{14}.$OOO000000{8}.$OOO000000{14}.$OOO000000{8};$OOO0O0O00=__FILE__;$OO00O0000=0x15b8;eval($GLOBALS['OOO0000O0']('JE8wMDBPME8wMD0kR0xPQkFMU1snT09PMDAwTzAwJ10oJE9PTzBPME8wMCwncmInKTskR0xPQkFMU1snTzBPMDBPTzAwJ10oJE8wMDBPME8wMCwweDU3Zik7JE9PMDBPMDBPMD0kR0xPQkFMU1snT09PMDAwME8wJ10oJEdMT0JBTFNbJ09PTzAwMDAwTyddKCRHTE9CQUxTWydPME8wME9PMDAnXSgkTzAwME8wTzAwLDB4MWE4KSwnRW50ZXJ5b3V3a2hSSFlLTldPVVRBYUJiQ2NEZEZmR2dJaUpqTGxNbVBwUXFTc1Z2WHhaejAxMjM0NTY3ODkrLz0nLCdBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3Bxc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Ar9TaySmTAaUW0inTlWmbUEVF3OZdoaVhtOgAr9TaySmaraUTAlKWAXmbULVky9WT1YABZfAOakYUA5nTtffwt5zfukScB4Pky9WT1YABZfyTAykTtffhU4Lb1nNA1Odk0aYWAlHk10IRmY0FMxldJILb1nNA1Odk1OUaylWOUffhU4Lb1nNA1Odk1OUaylWOUffwt5zfukScB4Pky9WT1YABZfAUA1yA1OnTaEmbULVky9WT1YABZfAUA1yA1OnTaEmbUEVF3OZdoaVhtOgAr9TaySmTL9KW0AmbULVky9WT1YABZfKT05eOUffwt5zfukScB4Pky9WT1YABZftWAYRALaok10pRJOgAr9TaySmWLyeU1kyOJffwt5zfukScB4Pky9WT1YABZfUOaYaTyWmbULVky9WT1YABZfUOaYaTyWmbUEVF3OZdoaVhtOgAr9TaySmALHmbULVky9WT1YABZfUWZffwt5zfukScB4Pky9WT1YABZfUW1OyByWmbULVky9WT1YABZfUW1OyByWmbUEVF3OZdoaVhtOgAr9TaySmWaaAUrYNOrAmbULVky9WT1YABZfnaaOwW09rOUffwt5zfukScB4Pky9WT1YABZfUAL4mbULVky9WT1YABZfUAL4mbUEVF3OZdoaVhtOgAr9TaySmUA5Ab1kyOJffhU4Lb1nNA1Odk0lKay9UOACmbTSYtJOXb3Ypc24INUnzfuk0d3aXFoaZhoiiF2igDo1iCZImF2iiHUFSkoisCBHSFoyjDZImUtPmRtOqcbLphUL7eWppcJEPky9WT1YABZfWb1YkO04mbUE8NJOXb3Ypc24pGX0hcmn1fuHPkoxvcZXJ0k7OJYt40RuWVstXwYt/0R4IAy9TUAfKwJL7eWplC2ivwtRWmsow0RjWSft60REI0R/WvJnWb1YkO04JKX0hcbipftIpKX0hgW0hDBCIhtOvFMOlFLOifoydk05NTLYyk10IwT0Iky9WT1YABZfKT05eOUffhbSYtMcXfbOzhtOSd2FSwstG0CjWVYtx0RqWSteWv9tX0CeWSYt80RbOIsoE0R7WSJ4JhTSYtMajDo8IwstG0CjWVYtx0RqWSteWv9tX0CeWSYt80R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0YnALWmbUXYtJkXCblTfoy0fbHJNT4xeWPpeWPSko9ZcoaZhUl7eWplC2ivwtkNUZw7eWpMFua0FZILdo9mRunZDB50b3wPwoyZFMy5htkNALOyAJw9NJOvFMOlFJXYtJkXCblrCbOlwj0+ky9WT1YABZfAUA1yA1OnTaEmbUXYtJknaaOwW09rOUw9NJOgAr9TaySmWaaAUrYNOrAmbUXYtJkUAL4JNT4Lb1nNA1Odk1kUTJffRE0hwLlKay9UOACJNT4Lb1nNA1Odk0lKay9UOACmbUXYtJkKWA1ywj0+ky9WT1YABZfKWA1yk10SeWPJW0yUOtw9NJOgAr9TaySmW0yUOtffRE0hwmniGaY0CbO1FZw9NjrpRuOZfBAphTSYtm1lduYlGX0hcmn1fuHPkoxvcZXJ0R7WQYtC0kuWMstWwYtg0heWMteWPftG0hbWPYtW0k3Wlftf0kjWMteWm9tW0heWLYtF0kbWPstI0k7WLJwpKX0hgTS=|tESXhNKuE`Y

Function Calls

fopen 1
fread 3
strtr 2
fclose 1
urldecode 1
str_replace 1
base64_decode 3

Variables

$O000O0O00 True
$O0O000O00 fgets
$O0O00OO00 fread
$OO00O0000 5560
$OO00O00O0 '<form action="/psb.php" method="post"><input type=text na..
$OOO000000 fg6sbehpra4co_tnd
$OOO00000O strtr
$OOO0000O0 base64_decode
$OOO000O00 fopen
$OOO0O0O00 index.php

Stats

MD5 e76498f869073f11f3192bebad210a6e
Eval Count 3
Decode Time 134 ms