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 goto XjUyV; avMKn: $page = "\144\141\x64\x6f\163"; goto BDw2g; OrOGF: $access ..
Decoded Output download
<?php
goto XjUyV;
avMKn:
$page = "dados";
goto BDw2g;
OrOGF:
$access = $_SESSION["logged_user"]["acesso"];
goto QGw1h;
vfcTv:
include "inc/functionscpp.php";
goto RJ2sq;
RJ2sq:
include "inc/Acl.php";
goto OrOGF;
cxYBC:
$acl = '';
goto y1MUQ;
XjUyV:
session_start();
goto vfcTv;
BDw2g:
$action = "update";
goto cxYBC;
QGw1h:
$role = $access;
goto avMKn;
y1MUQ:
$acc = '';
goto hxyAP;
hxyAP:
include "inc/config.php";
include "inc/functions.php";
if (isset($_POST["id"])) {
$i = get_item("chamados", $_POST["id"]);
$log = R::dispense("logs");
$log->hora = date("Y-m-d\TH:i:s");
$log->ip = $_SERVER["REMOTE_ADDR"];
$log->mensagem = $_SESSION["logged_user"]["nome"] . " modificou o chamado com o ttulo de [" . $i["titulo"] . "]" . "ID:[" . $i["id"] . "]";
$i->nref = $_POST["nref"];
$i->titulo = $_POST["titulo"];
$i->dataat = $_POST["dataat"];
$i->superint = $_POST["superint"];
$i->tiposerv = $_POST["tiposerv"];
$i->descr = $_POST["descr"];
$i->categ = $_POST["categ"];
$i->resp = $_POST["resp"];
$i->priori = $_POST["priori"];
$i->obs = $_POST["obs"];
$i->datanorma = $_POST["datanorma"];
$i->solucaodesc = $_POST["solucaodesc"];
$dataat = $_POST["dataat"];
$datanorma = $_POST["datanorma"];
$pend1 = $_POST["pend1"];
$pend2 = $_POST["pend2"];
if ($_POST["datanorma"] != null) {
$atuacao = new DateTime("{$dataat}");
$norma = new DateTime("{$datanorma}");
$diff_atnorma = $atuacao->diff($norma);
$dias_atnorma = (int) ($diff_atnorma->d * 24);
$horas_atnorma = $dias_atnorma * 60 + $diff_atnorma->h * 60 + $diff_atnorma->i;
$inicio_pend = new DateTime("{$pend1}");
$fim_pend = new DateTime("{$pend2}");
$diff_pend = $inicio_pend->diff($fim_pend);
$dias_pend = (int) ($diff_pend->d * 24);
$horas_pend = $dias_pend * 60 + $diff_pend->h * 60 + $diff_pend->i;
$pendBD = $i->pend;
$stringPEND = $pendBD;
$horasBD = substr($stringPEND, 0, strpos($stringPEND, ":"));
$minBD = substr($stringPEND, -2, 2);
$hrs = (int) $horasBD;
$tempoBD = (int) ($hrs * 60) + (int) $minBD;
$somaPEND = $horas_pend + $tempoBD;
$hhpend = (int) ($somaPEND / 60);
$rhhpend = sprintf("%02d", $hhpend);
$mmpend = $somaPEND % 60;
$mmpendd = sprintf("%02d", $mmpend);
$totalpend = "{$rhhpend}:{$mmpendd}";
$i->pend = $totalpend;
$horas_resoluc = $horas_atnorma - $somaPEND;
$horas = (int) ($horas_resoluc / 60);
$hrss = sprintf("%02d", $horas);
$minutos = $horas_resoluc % 60;
$mintt = sprintf("%02d", $minutos);
$total = "{$hrss}:{$mintt}";
$totalvar = substr($total, 0, 1);
if ($totalvar == "-") {
$i->resoluc = 0;
} else {
$i->resoluc = $total;
}
$sla2h = "02:00";
$sla12h = "12:00";
if ($total <= $sla2h) {
$i->sla = "2H";
}
if ($total > $sla2h) {
$i->sla = "12H";
}
if ($total > $sla12h) {
$i->sla = "48H";
}
}
R::store($i);
R::store($log);
GoToNow("/chamados.php?action=update");
} else {
GoToNow("/chamados.php");
} ?>
Did this file decode correctly?
Original Code
<?php
goto XjUyV;
avMKn:
$page = "\144\141\x64\x6f\163";
goto BDw2g;
OrOGF:
$access = $_SESSION["\154\x6f\147\147\x65\x64\137\165\x73\145\162"]["\141\x63\145\x73\163\x6f"];
goto QGw1h;
vfcTv:
include "\151\156\x63\x2f\x66\165\x6e\143\x74\151\157\x6e\x73\143\160\160\x2e\x70\150\160";
goto RJ2sq;
RJ2sq:
include "\151\x6e\143\x2f\101\x63\154\x2e\160\x68\160";
goto OrOGF;
cxYBC:
$acl = '';
goto y1MUQ;
XjUyV:
session_start();
goto vfcTv;
BDw2g:
$action = "\x75\x70\x64\x61\164\x65";
goto cxYBC;
QGw1h:
$role = $access;
goto avMKn;
y1MUQ:
$acc = '';
goto hxyAP;
hxyAP:
include "\151\156\x63\x2f\143\157\x6e\146\151\x67\x2e\x70\150\160";
include "\151\156\143\57\x66\x75\156\x63\164\x69\157\x6e\x73\56\x70\x68\x70";
if (isset($_POST["\151\144"])) {
$i = get_item("\143\x68\141\x6d\x61\x64\157\x73", $_POST["\151\144"]);
$log = R::dispense("\154\x6f\147\x73");
$log->hora = date("\131\55\155\55\x64\x5c\x54\110\72\151\x3a\163");
$log->ip = $_SERVER["\x52\105\115\117\124\105\x5f\x41\x44\104\122"];
$log->mensagem = $_SESSION["\154\157\147\x67\x65\144\x5f\165\x73\x65\x72"]["\156\157\x6d\x65"] . "\x20\x6d\x6f\144\151\x66\151\x63\157\165\40\x6f\x20\x63\150\141\155\141\x64\x6f\40\143\x6f\x6d\40\157\x20\164\xc3\xad\x74\165\154\157\40\144\x65\x20\133" . $i["\x74\151\x74\x75\x6c\x6f"] . "\x5d" . "\x49\104\x3a\133" . $i["\151\x64"] . "\x5d";
$i->nref = $_POST["\x6e\162\x65\146"];
$i->titulo = $_POST["\164\x69\x74\x75\x6c\157"];
$i->dataat = $_POST["\x64\141\x74\x61\x61\164"];
$i->superint = $_POST["\x73\x75\x70\x65\x72\151\156\164"];
$i->tiposerv = $_POST["\164\151\160\157\163\x65\162\166"];
$i->descr = $_POST["\144\145\163\143\x72"];
$i->categ = $_POST["\143\141\164\x65\147"];
$i->resp = $_POST["\x72\x65\163\x70"];
$i->priori = $_POST["\160\x72\x69\x6f\x72\151"];
$i->obs = $_POST["\157\142\163"];
$i->datanorma = $_POST["\x64\141\164\x61\x6e\x6f\162\x6d\141"];
$i->solucaodesc = $_POST["\x73\x6f\x6c\165\143\141\x6f\x64\x65\163\143"];
$dataat = $_POST["\144\141\x74\141\141\164"];
$datanorma = $_POST["\144\141\x74\141\156\157\x72\x6d\x61"];
$pend1 = $_POST["\160\145\156\x64\61"];
$pend2 = $_POST["\160\145\156\x64\x32"];
if ($_POST["\144\141\164\x61\x6e\157\x72\x6d\141"] != null) {
$atuacao = new DateTime("{$dataat}");
$norma = new DateTime("{$datanorma}");
$diff_atnorma = $atuacao->diff($norma);
$dias_atnorma = (int) ($diff_atnorma->d * 24);
$horas_atnorma = $dias_atnorma * 60 + $diff_atnorma->h * 60 + $diff_atnorma->i;
$inicio_pend = new DateTime("{$pend1}");
$fim_pend = new DateTime("{$pend2}");
$diff_pend = $inicio_pend->diff($fim_pend);
$dias_pend = (int) ($diff_pend->d * 24);
$horas_pend = $dias_pend * 60 + $diff_pend->h * 60 + $diff_pend->i;
$pendBD = $i->pend;
$stringPEND = $pendBD;
$horasBD = substr($stringPEND, 0, strpos($stringPEND, "\72"));
$minBD = substr($stringPEND, -2, 2);
$hrs = (int) $horasBD;
$tempoBD = (int) ($hrs * 60) + (int) $minBD;
$somaPEND = $horas_pend + $tempoBD;
$hhpend = (int) ($somaPEND / 60);
$rhhpend = sprintf("\x25\x30\x32\x64", $hhpend);
$mmpend = $somaPEND % 60;
$mmpendd = sprintf("\x25\60\x32\x64", $mmpend);
$totalpend = "{$rhhpend}\72{$mmpendd}";
$i->pend = $totalpend;
$horas_resoluc = $horas_atnorma - $somaPEND;
$horas = (int) ($horas_resoluc / 60);
$hrss = sprintf("\45\60\62\144", $horas);
$minutos = $horas_resoluc % 60;
$mintt = sprintf("\x25\x30\x32\x64", $minutos);
$total = "{$hrss}\x3a{$mintt}";
$totalvar = substr($total, 0, 1);
if ($totalvar == "\55") {
$i->resoluc = 0;
} else {
$i->resoluc = $total;
}
$sla2h = "\60\62\72\x30\60";
$sla12h = "\x31\62\x3a\x30\60";
if ($total <= $sla2h) {
$i->sla = "\x32\110";
}
if ($total > $sla2h) {
$i->sla = "\x31\x32\x48";
}
if ($total > $sla12h) {
$i->sla = "\64\70\110";
}
}
R::store($i);
R::store($log);
GoToNow("\x2f\x63\x68\x61\155\x61\x64\157\163\x2e\x70\150\x70\x3f\x61\x63\x74\x69\157\x6e\x3d\x75\160\x64\141\x74\x65");
} else {
GoToNow("\x2f\143\150\141\155\x61\144\157\163\x2e\x70\150\x70");
}
Function Calls
None |
Stats
MD5 | 18ce0a617872f6926148ac5247dd35a4 |
Eval Count | 0 |
Decode Time | 48 ms |