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 /* Cdigo fonte protegido - Pblica Tecnologia */$OOO000000=urldecode('%66%67%36%73%62..
Decoded Output download
session_start();
ini_set('memory_limit','-1');
set_time_limit(120);
header("Content-type:application/json");
header("Access-Control-Allow-Origin:*");
if (
isset($_GET['api'])
and isset($_GET['token'])
) {
include '../class/conecta.class.php';
include '../funcoes/funcoes.php';
new conecta_bd('TRANSPARENCIA','..\');
$tipo = $_GET['api'];
$token = $_GET['token'];
$qryapi = ibase_prepare("SELECT * FROM API WHERE ID = $tipo");
$exeapi = ibase_execute($qryapi) or die("Erro ao conectar:".ibase_errmsg());
$lnapi = ibase_fetch_assoc($exeapi,IBASE_TEXT);
$codigo = htmlentities($lnapi['ID']);
$descricao = htmlentities($lnapi['DESCRICAO']);
$conexao = htmlentities($lnapi['CONEXAO']);
$restrito = htmlentities($lnapi['RESTRITO']);
$ano = htmlentities($lnapi['ANO']);
$sql = ($lnapi['SQL']);
$formato = htmlentities($lnapi['FORMATO']);
$token_banco_dados = htmlentities($lnapi['TOKEN']);
$datainicial = FormataData_html5($lnapi['DTINICIAL']);
$datafinal = FormataData_html5($lnapi['DTFINAL']);
if ($conexao == 'SCPI')
if (isset($_GET['ANO']))
$_SESSION['ano'] = $_GET['ANO'];
else
$_SESSION['ano'] = $ano;
$qryapi = ibase_prepare("SELECT * FROM API_PARAMS WHERE IDAPI = $codigo");
$exeapi = ibase_execute($qryapi) or die("Erro ao conectar:".ibase_errmsg());
while ($lnapi = ibase_fetch_assoc($exeapi)) {
foreach ($lnapi as $key =>$parametro) {
if ($key == 'PARAMETRO') {
if (filter_input(1,$parametro)) {
$valorParametro = filter_input(1,$parametro,FILTER_DEFAULT);
if ($lnapi['TIPO'] == 'V'||$lnapi['TIPO'] == 'C') {
$valorParametro = "'".$valorParametro ."'";
}elseif ($lnapi['TIPO'] == 'D') {
$valorParametro = str_replace("/",".",$valorParametro);
$valorParametro = "'".$valorParametro ."'";
}else {
$valorParametro = filter_var($valorParametro,FILTER_VALIDATE_INT);
}
if ($lnapi['OBRIGATORIO'] == 'N') {
if (preg_match("/WHERE/i",$sql)) {
$sql = str_replace(":".$parametro,"AND $parametro = $valorParametro",$sql);
}else {
$sql = str_replace(":".$parametro,"WHERE $parametro = $valorParametro",$sql);
}
}else {
$sql = str_replace(":".$parametro,$valorParametro,$sql);
}
}else {
if ($lnapi['OBRIGATORIO'] == 'S') {
print_r(json_encode(['Error'=>"Ha parametros obrigatorios nao informados"]));
return;
}else {
$sql = str_replace(":".$parametro,'',$sql);
}
}
}
}
}
if ($token == $token_banco_dados) {
$existe_dados = 0;
new conecta_bd("$conexao",'..\');
$exe_web = ibase_query($sql);
while ($row = ibase_fetch_assoc($exe_web,IBASE_TEXT)) {
$existe_dados = 1;
$array_web[] = array_map('utf8_encode',$row);
}
ibase_close();
if ($existe_dados >0) {
echo (json_encode($array_web));
}else {
print_r(json_encode(['result'=>"Nenhum registro encontrado"]));
}
}else {
print_r(json_encode(['result'=>"Token invlido"]));
}
}else {
print_r(json_encode(['Error'=>"Falta parmetros"]));
};
Did this file decode correctly?
Original Code
<?php /* Cdigo fonte protegido - Pblica Tecnologia */$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=0xeec;eval($GLOBALS['OOO0000O0']('JE8wMDBPME8wMD0kR0xPQkFMU1snT09PMDAwTzAwJ10oJE9PTzBPME8wMCwncmInKTskR0xPQkFMU1snTzBPMDBPTzAwJ10oJE8wMDBPME8wMCwweDUzYyk7JE9PMDBPMDBPMD0kR0xPQkFMU1snT09PMDAwME8wJ10oJEdMT0JBTFNbJ09PTzAwMDAwTyddKCRHTE9CQUxTWydPME8wME9PMDAnXSgkTzAwME8wTzAwLDB4MWE4KSwnRW50ZXJ5b3V3a2hSSFlLTldPVVRBYUJiQ2NEZEZmR2dJaUpqTGxNbVBwUXFTc1Z2WHhaejAxMjM0NTY3ODkrLz0nLCdBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvJykpO2V2YWwoJE9PMDBPMDBPMCk7'));return;?>id@suRCDuwaA{pWCHIkr9NHenNHenNHe1zfukgFMaXdoyjcUImb19oUAxyb18mRtwmwJ4LT09NHr8XTzEXRJwmwJXLO0xNWLyHA1SmT09NHeEXHr8Xk10PkrfHT0knTyYdk09NTzEXHeEXTZffhtOuTr9tWAxTBZfNHr8XHr9NHeEmbUILTzEXHr8XTzEXRtONTzEXTzEXHeEpRtfydmOlFmlvfbfqDykwBAsKa09aaryiWMkeC0OLOMcuc0lpUMpHdr1sAunOFaYzamcCGyp6HerZHzW1YjF4KUSvNUFSk0ytW0OyOLfwUApRTr1KT1nOAlYAaacbBylDCBkjcoaMc2ipDMsSdB5vFuyZF3O1fmf4GbPXHTwzYeA2YzI5hZ8mhULpK2cjdo9zcUILTzEXHr8XTzEXhTslfMyShtONTzEXTzEXTzEpKX==eWp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oYPb2yzF29jhtOlGoagf2aJRrltWaYyb1OyByWphUn7eWPLcbipF3Olb2Oico9zwe0IHTSYtJOiFmkiGa93cBkdbUE9woyZFMy5b21iFtImfbOMKy9ldMYvcoAmRtOZd3FpKX0hgW0hDBkiF2agC2xvF2APhTSYtMlMwtILcbipF3Olb2Oico9zwe4XhUn7eWplC2ivwtiQF29Vb2aVC29LcUILCbkZCblgf2aJhUL7eWp9cBxzcUn7eWpXFMlVfy9Zhopzd25gcB5jd2OlhySmFMazfBx0kz0+wL5ldMi1dUnZcBfpF3OZdZnldMYvdmOZCBOvwl0phTSYtm0Ytm1lduYlwuSYtmnZDB50b3wPDmYvdl9ldMYvcoAPBZfZcbY1duWmNT4Jao9qcB4IDB524Bxpco8JbULpKX0hgW0hgBaSF2AIGX0hFukpdmOgFJiQF29Vb2aVC29LcUidk0aZFM9Zkz0+wLciduOiwuniFVkscbOZd3HJbULpKX0hgTS=IkOxmo|L
Function Calls
fopen | 1 |
fread | 3 |
strtr | 2 |
fclose | 1 |
urldecode | 1 |
str_replace | 1 |
base64_decode | 3 |
Stats
MD5 | c3f2303070d0287d9a6a1a0d8e123090 |
Eval Count | 3 |
Decode Time | 148 ms |