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 ${"G\x4c\x4f\x42\x41\x4c\x53"}["f\x6f\x6bk\x67\x61\x62\x70\x76\x6a"]="\x43F\x47\x5f\..

Decoded Output download

<?php ${"GLOBALS"}["fokkgabpvj"]="CFG_DB";${"GLOBALS"}["rizjvdlfow"]="data";${"GLOBALS"}["dzxsavumjhri"]="query";${"GLOBALS"}["vcpnae"]="row";${"GLOBALS"}["hgcfpwgbz"]="i";${"GLOBALS"}["xtyxbovibye"]="sql";${"GLOBALS"}["rftjebkkfg"]="stmt";${"GLOBALS"}["uamiak"]="e";${"GLOBALS"}["fsaxylcvyuy"]="hostname";class DBiclass{private$dbcn;public function __construct($hostname=NULL,$username=NULL,$password=NULL,$database=NULL){try{$fxqifcxpeu="database";${"GLOBALS"}["rgebmzsu"]="username";$yrkuexes="password";$this->dbcn=new PDO("mysql:host=".${${"GLOBALS"}["fsaxylcvyuy"]}.";dbname=".${$fxqifcxpeu},${${"GLOBALS"}["rgebmzsu"]},${$yrkuexes},array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES 'utf8'"));}catch(PDOException$e){echo$e->getMessage();die();}}public function query($sql){$fzhmrqdyizg="sql";${"GLOBALS"}["ncgobdvgts"]="sql";$bbslrgt="stmt";${$bbslrgt}=$this->dbcn->prepare(${$fzhmrqdyizg});try{$stmt->execute()or error_log(print_r($stmt->errorInfo(),true));}catch(PDOException$e){print_r(${${"GLOBALS"}["uamiak"]});}if(!${${"GLOBALS"}["rftjebkkfg"]}){$pinhhu="sql";echo"Error: ".json_encode($stmt->errorInfo())."<br />Error No: ".$stmt->errorCode()."<br />".${$pinhhu};exit();}if(substr(trim(${${"GLOBALS"}["ncgobdvgts"]}),0,6)=="SELECT"||substr(trim(${${"GLOBALS"}["xtyxbovibye"]}),0,4)=="SHOW"){$sfxykgnbvjm="data";$njdnxyukaw="data";${${"GLOBALS"}["hgcfpwgbz"]}=0;$amubmeiqoydn="i";${$njdnxyukaw}=array();while(${${"GLOBALS"}["vcpnae"]}=$stmt->fetch(PDO::FETCH_ASSOC)){${"GLOBALS"}["yzxehbxp"]="data";$rdfpykyoljw="i";${${"GLOBALS"}["yzxehbxp"]}[${$rdfpykyoljw}]=${${"GLOBALS"}["vcpnae"]};${${"GLOBALS"}["hgcfpwgbz"]}++;}${"GLOBALS"}["mfxwkrqt"]="query";$stmt->closeCursor();${"GLOBALS"}["jiypgycmkgvd"]="data";${${"GLOBALS"}["dzxsavumjhri"]}=new stdClass();$query->row=isset(${${"GLOBALS"}["rizjvdlfow"]}[0])?${${"GLOBALS"}["jiypgycmkgvd"]}[0]:array();$query->rows=${$sfxykgnbvjm};$query->num_rows=${$amubmeiqoydn};unset(${${"GLOBALS"}["rizjvdlfow"]});return${${"GLOBALS"}["mfxwkrqt"]};}else{return true;}}public function getDbName(){global$CFG_DB;return${${"GLOBALS"}["fokkgabpvj"]}["database"];}public function getDbNameMagento(){global$CFG_DB_MAGENTO;$ibkguv="CFG_DB_MAGENTO";return${$ibkguv}["database"];}public function getDbPrefixMagento(){${"GLOBALS"}["tbkuigmvb"]="CFG_DB_MAGENTO";global$CFG_DB_MAGENTO;return${${"GLOBALS"}["tbkuigmvb"]}["dbprefix"];}public function __destruct(){$this->dbcn=null;}} 
?>

Did this file decode correctly?

Original Code

<?php ${"G\x4c\x4f\x42\x41\x4c\x53"}["f\x6f\x6bk\x67\x61\x62\x70\x76\x6a"]="\x43F\x47\x5f\x44\x42";${"\x47L\x4f\x42\x41\x4c\x53"}["\x72\x69\x7a\x6av\x64\x6c\x66o\x77"]="\x64at\x61";${"G\x4cOB\x41L\x53"}["d\x7a\x78\x73a\x76\x75m\x6a\x68ri"]="\x71\x75er\x79";${"\x47\x4c\x4f\x42\x41L\x53"}["v\x63\x70n\x61e"]="row";${"GLO\x42ALS"}["\x68g\x63\x66p\x77gb\x7a"]="\x69";${"\x47\x4c\x4fB\x41L\x53"}["\x78t\x79\x78bov\x69\x62\x79\x65"]="\x73\x71\x6c";${"\x47\x4c\x4f\x42A\x4cS"}["\x72\x66t\x6a\x65b\x6b\x6bfg"]="s\x74mt";${"\x47\x4cO\x42A\x4c\x53"}["\x75\x61\x6di\x61k"]="\x65";${"\x47\x4c\x4fB\x41\x4cS"}["\x66s\x61\x78y\x6ccv\x79u\x79"]="h\x6f\x73tn\x61\x6de";class DBiclass{private$dbcn;public function __construct($hostname=NULL,$username=NULL,$password=NULL,$database=NULL){try{$fxqifcxpeu="\x64\x61\x74\x61ba\x73\x65";${"\x47\x4cOB\x41LS"}["rg\x65b\x6dzsu"]="u\x73\x65\x72\x6ea\x6d\x65";$yrkuexes="p\x61\x73\x73\x77\x6f\x72\x64";$this->dbcn=new PDO("m\x79sq\x6c:\x68\x6fs\x74=".${${"G\x4c\x4f\x42\x41\x4cS"}["f\x73\x61\x78\x79l\x63\x76y\x75\x79"]}."\x3bdb\x6e\x61m\x65=".${$fxqifcxpeu},${${"\x47\x4cOB\x41\x4c\x53"}["\x72g\x65b\x6d\x7as\x75"]},${$yrkuexes},array(PDO::MYSQL_ATTR_INIT_COMMAND=>"\x53E\x54\x20\x4eAMES '\x75t\x668'"));}catch(PDOException$e){echo$e->getMessage();die();}}public function query($sql){$fzhmrqdyizg="\x73ql";${"\x47\x4cO\x42\x41\x4c\x53"}["\x6e\x63g\x6f\x62\x64\x76\x67t\x73"]="s\x71\x6c";$bbslrgt="\x73tm\x74";${$bbslrgt}=$this->dbcn->prepare(${$fzhmrqdyizg});try{$stmt->execute()or error_log(print_r($stmt->errorInfo(),true));}catch(PDOException$e){print_r(${${"GL\x4f\x42\x41LS"}["\x75\x61\x6d\x69a\x6b"]});}if(!${${"\x47L\x4f\x42\x41\x4c\x53"}["\x72f\x74\x6a\x65bkk\x66g"]}){$pinhhu="s\x71l";echo"E\x72r\x6f\x72: ".json_encode($stmt->errorInfo())."<\x62r /\x3e\x45rror No:\x20".$stmt->errorCode()."\x3cb\x72 />".${$pinhhu};exit();}if(substr(trim(${${"\x47\x4c\x4f\x42AL\x53"}["\x6ec\x67\x6f\x62\x64\x76g\x74s"]}),0,6)=="\x53E\x4c\x45\x43\x54"||substr(trim(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x78t\x79x\x62\x6f\x76\x69b\x79e"]}),0,4)=="S\x48OW"){$sfxykgnbvjm="d\x61\x74\x61";$njdnxyukaw="\x64\x61ta";${${"\x47\x4cOB\x41\x4cS"}["\x68\x67\x63fp\x77\x67b\x7a"]}=0;$amubmeiqoydn="\x69";${$njdnxyukaw}=array();while(${${"\x47\x4cOB\x41\x4cS"}["vcp\x6eae"]}=$stmt->fetch(PDO::FETCH_ASSOC)){${"G\x4cO\x42\x41\x4cS"}["yzx\x65h\x62\x78\x70"]="da\x74a";$rdfpykyoljw="\x69";${${"\x47\x4cO\x42\x41\x4cS"}["yz\x78\x65\x68\x62xp"]}[${$rdfpykyoljw}]=${${"\x47\x4c\x4fB\x41L\x53"}["\x76c\x70n\x61\x65"]};${${"G\x4cO\x42\x41\x4c\x53"}["\x68\x67\x63\x66\x70\x77\x67\x62\x7a"]}++;}${"G\x4c\x4fB\x41\x4cS"}["m\x66xwk\x72\x71t"]="\x71\x75er\x79";$stmt->closeCursor();${"\x47\x4c\x4fB\x41\x4c\x53"}["\x6a\x69\x79p\x67\x79\x63m\x6b\x67\x76d"]="\x64a\x74\x61";${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x64z\x78\x73\x61\x76\x75\x6d\x6a\x68\x72\x69"]}=new stdClass();$query->row=isset(${${"GLO\x42\x41\x4c\x53"}["\x72\x69\x7a\x6av\x64\x6c\x66\x6fw"]}[0])?${${"\x47L\x4fB\x41\x4cS"}["\x6a\x69yp\x67\x79\x63\x6d\x6b\x67v\x64"]}[0]:array();$query->rows=${$sfxykgnbvjm};$query->num_rows=${$amubmeiqoydn};unset(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x72\x69z\x6a\x76\x64lfo\x77"]});return${${"\x47\x4cOB\x41\x4c\x53"}["mf\x78\x77k\x72\x71\x74"]};}else{return true;}}public function getDbName(){global$CFG_DB;return${${"GLO\x42\x41\x4cS"}["\x66\x6fk\x6bg\x61\x62\x70\x76\x6a"]}["d\x61t\x61b\x61\x73e"];}public function getDbNameMagento(){global$CFG_DB_MAGENTO;$ibkguv="\x43\x46G\x5f\x44\x42_M\x41\x47\x45\x4e\x54O";return${$ibkguv}["da\x74\x61base"];}public function getDbPrefixMagento(){${"\x47\x4c\x4f\x42\x41L\x53"}["\x74\x62\x6b\x75\x69g\x6d\x76\x62"]="C\x46G\x5f\x44B\x5f\x4dA\x47\x45\x4e\x54O";global$CFG_DB_MAGENTO;return${${"\x47LOB\x41\x4cS"}["\x74\x62kui\x67\x6d\x76\x62"]}["\x64b\x70\x72e\x66\x69x"];}public function __destruct(){$this->dbcn=null;}}
?>

Function Calls

None

Variables

GLOBALS [{'key': 'fokkgabpvj', 'value': 'CFG_DB'}, {'key': 'rizjvdlfow', 'value': 'data'}, {'key': 'dzxsavumjhri', 'value': 'query'}, {'key': 'vcpnae', 'value': 'row'}, {'key': 'hgcfpwgbz', 'value': 'i'}, {'key': 'xtyxbovibye', 'value': 'sql'}, {'key': 'rftjebkkfg', 'value': 'stmt'}, {'key': 'uamiak', 'value': 'e'}, {'key': 'fsaxylcvyuy', 'value': 'hostname'}]

Stats

MD5 4148e5833d12461e6bba8e84d489c019
Eval Count 0
Decode Time 58 ms