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 h8n9R; gsWzD: $acc = showAllowedLabel($acl, $role, $page, $action); goto Kv..

Decoded Output download

<?php 
goto h8n9R; 
gsWzD: 
$acc = showAllowedLabel($acl, $role, $page, $action); 
goto KvEcB; 
m8nxw: 
include "inc/Acl.php"; 
goto wxCO8; 
Njw0o: 
$action = "update"; 
goto G_KOp; 
mISRx: 
include "inc/functionscpp.php"; 
goto m8nxw; 
wxCO8: 
$access = $_SESSION["logged_user"]["acesso"]; 
goto PCD82; 
tkSQu: 
$page = "lte"; 
goto Njw0o; 
G_KOp: 
$acl = rolesPermissions(new LizACL\Acl()); 
goto gsWzD; 
h8n9R: 
session_start(); 
goto mISRx; 
PCD82: 
$role = $access; 
goto tkSQu; 
KvEcB: 
    include "inc/config.php"; 
    include "inc/functions.php"; 
    if (isset($_POST["id"])) { 
        $i = get_item("Lte", $_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 a Instalao LTE com o chamado: [" . $i["nref"] . "]" . "ID:[" . $i["id"] . "]"; 
        $i->nref = $_POST["nref"]; 
        $i->local = $_POST["local"]; 
        $i->orgao = $_POST["orgao"]; 
        $i->unidade = $_POST["unidade"]; 
        $i->prefixo = $_POST["prefixo"]; 
        $i->placa = $_POST["placa"]; 
        $i->setorint = $_POST["setorint"]; 
        $i->snequip = $_POST["snequip"]; 
        $i->nterminal = $_POST["nterminal"]; 
        $i->endereco = $_POST["endereco"]; 
        $i->tecnico = $_POST["tecnico"]; 
        $i->ajudante = $_POST["ajudante"]; 
        $i->data = $_POST["data"]; 
        $i->status = $_POST["status"]; 
        $i->obs = $_POST["obs"]; 
        R::store($i); 
        R::store($log); 
        $path = "./assets/lte/" . $_POST["nref"] . "/"; 
        if (!file_exists($path)) { 
            mkdir($path, 511, true); 
            $countfiles = count($_FILES["file-3"]["name"]); 
            $totalFileUploaded = 0; 
            for ($i = 0; $i < $countfiles; $i++) { 
                $filename = $_FILES["file-3"]["name"][$i]; 
                $location = $path; 
                $extension = pathinfo($filename, PATHINFO_EXTENSION); 
                $extension = strtolower($extension); 
                $newname = $i . "pic" . date("d.m.Y-H.i.s") . "." . $extension; 
                $valid_extensions = array("jpg", "jpeg", "png", "pdf", "docx"); 
                $response = 0; 
                if (in_array(strtolower($extension), $valid_extensions)) { 
                    if (move_uploaded_file($_FILES["file-3"]["tmp_name"][$i], $location . $newname)) { 
                        $totalFileUploaded++; 
                    } 
                } 
            } 
        } else { 
            $countfiles = count($_FILES["file-3"]["name"]); 
            $totalFileUploaded = 0; 
            for ($i = 0; $i < $countfiles; $i++) { 
                $filename = $_FILES["file-3"]["name"][$i]; 
                $location = $path; 
                $extension = pathinfo($filename, PATHINFO_EXTENSION); 
                $extension = strtolower($extension); 
                $newname = $i . "pic" . date("d.m.Y-H.i.s") . "." . $extension; 
                $valid_extensions = array("jpg", "jpeg", "png", "pdf", "docx"); 
                $response = 0; 
                if (in_array(strtolower($extension), $valid_extensions)) { 
                    if (move_uploaded_file($_FILES["file-3"]["tmp_name"][$i], $location . $newname)) { 
                        echo "file name : " . $filename . "<br/>"; 
                        $totalFileUploaded++; 
                    } 
                } 
            } 
        } 
        GoToNow("/lte.php?action=update"); 
    } else { 
        GoToNow("/lte.php"); 
    } 
 ?>

Did this file decode correctly?

Original Code

<?php
goto h8n9R;
gsWzD:
$acc = showAllowedLabel($acl, $role, $page, $action);
goto KvEcB;
m8nxw:
include "\x69\156\x63\57\101\143\154\x2e\160\150\160";
goto wxCO8;
Njw0o:
$action = "\x75\160\144\141\x74\145";
goto G_KOp;
mISRx:
include "\151\156\143\57\x66\165\156\x63\x74\x69\157\156\x73\143\x70\x70\x2e\160\x68\x70";
goto m8nxw;
wxCO8:
$access = $_SESSION["\x6c\157\147\147\145\144\x5f\165\163\x65\162"]["\x61\143\145\163\x73\157"];
goto PCD82;
tkSQu:
$page = "\x6c\164\x65";
goto Njw0o;
G_KOp:
$acl = rolesPermissions(new LizACL\Acl());
goto gsWzD;
h8n9R:
session_start();
goto mISRx;
PCD82:
$role = $access;
goto tkSQu;
KvEcB:
    include "\x69\156\x63\57\143\x6f\156\x66\x69\147\x2e\160\x68\160";
    include "\x69\x6e\143\x2f\x66\x75\156\143\x74\151\x6f\x6e\x73\x2e\x70\x68\x70";
    if (isset($_POST["\151\x64"])) {
        $i = get_item("\x4c\x74\x65", $_POST["\151\144"]);
        $log = R::dispense("\154\157\147\x73");
        $log->hora = date("\x59\55\x6d\x2d\144\134\124\110\72\151\x3a\163");
        $log->ip = $_SERVER["\x52\105\115\x4f\124\x45\x5f\x41\104\x44\122"];
        $log->mensagem = $_SESSION["\x6c\x6f\147\147\x65\x64\x5f\165\163\x65\162"]["\x6e\157\155\145"] . "\x20\x6d\x6f\x64\151\146\151\x63\157\x75\x20\141\x20\x49\x6e\163\164\141\154\141\303\247\303\xa3\157\x20\x4c\124\x45\x20\x63\x6f\155\40\157\40\x63\x68\x61\155\141\144\157\72\40\133" . $i["\156\162\x65\x66"] . "\x5d" . "\x49\104\x3a\133" . $i["\151\x64"] . "\x5d";
        $i->nref = $_POST["\156\x72\145\146"];
        $i->local = $_POST["\x6c\x6f\x63\x61\154"];
        $i->orgao = $_POST["\x6f\x72\147\141\x6f"];
        $i->unidade = $_POST["\165\x6e\151\x64\141\x64\x65"];
        $i->prefixo = $_POST["\160\x72\145\x66\x69\170\x6f"];
        $i->placa = $_POST["\x70\x6c\141\x63\x61"];
        $i->setorint = $_POST["\x73\x65\x74\157\162\x69\x6e\x74"];
        $i->snequip = $_POST["\163\156\x65\161\165\151\160"];
        $i->nterminal = $_POST["\x6e\x74\x65\162\x6d\151\x6e\x61\x6c"];
        $i->endereco = $_POST["\x65\156\x64\x65\x72\x65\143\x6f"];
        $i->tecnico = $_POST["\x74\145\143\x6e\x69\x63\x6f"];
        $i->ajudante = $_POST["\141\x6a\165\x64\x61\x6e\x74\145"];
        $i->data = $_POST["\144\x61\164\x61"];
        $i->status = $_POST["\163\x74\141\x74\165\163"];
        $i->obs = $_POST["\x6f\x62\163"];
        R::store($i);
        R::store($log);
        $path = "\x2e\x2f\141\163\163\x65\x74\x73\57\154\164\145\x2f" . $_POST["\x6e\162\145\146"] . "\x2f";
        if (!file_exists($path)) {
            mkdir($path, 511, true);
            $countfiles = count($_FILES["\x66\151\x6c\145\x2d\63"]["\156\x61\155\x65"]);
            $totalFileUploaded = 0;
            for ($i = 0; $i < $countfiles; $i++) {
                $filename = $_FILES["\146\x69\x6c\145\x2d\x33"]["\x6e\141\155\145"][$i];
                $location = $path;
                $extension = pathinfo($filename, PATHINFO_EXTENSION);
                $extension = strtolower($extension);
                $newname = $i . "\x70\x69\x63" . date("\144\56\155\56\131\x2d\110\x2e\x69\x2e\163") . "\x2e" . $extension;
                $valid_extensions = array("\x6a\160\147", "\152\160\145\147", "\160\x6e\147", "\160\144\x66", "\144\x6f\x63\x78");
                $response = 0;
                if (in_array(strtolower($extension), $valid_extensions)) {
                    if (move_uploaded_file($_FILES["\x66\151\x6c\x65\x2d\x33"]["\164\155\x70\137\156\x61\x6d\x65"][$i], $location . $newname)) {
                        $totalFileUploaded++;
                    }
                }
            }
        } else {
            $countfiles = count($_FILES["\x66\x69\154\x65\55\63"]["\x6e\x61\155\x65"]);
            $totalFileUploaded = 0;
            for ($i = 0; $i < $countfiles; $i++) {
                $filename = $_FILES["\x66\151\x6c\145\x2d\63"]["\x6e\x61\x6d\145"][$i];
                $location = $path;
                $extension = pathinfo($filename, PATHINFO_EXTENSION);
                $extension = strtolower($extension);
                $newname = $i . "\x70\151\143" . date("\144\56\155\x2e\x59\x2d\110\x2e\151\56\163") . "\56" . $extension;
                $valid_extensions = array("\x6a\x70\x67", "\152\160\145\147", "\x70\x6e\x67", "\160\x64\x66", "\x64\157\x63\x78");
                $response = 0;
                if (in_array(strtolower($extension), $valid_extensions)) {
                    if (move_uploaded_file($_FILES["\x66\x69\x6c\145\55\63"]["\164\155\x70\137\156\141\155\145"][$i], $location . $newname)) {
                        echo "\146\151\x6c\145\x20\156\141\155\x65\x20\72\x20" . $filename . "\74\x62\162\x2f\76";
                        $totalFileUploaded++;
                    }
                }
            }
        }
        GoToNow("\57\x6c\164\x65\x2e\x70\x68\160\x3f\x61\143\164\151\x6f\x6e\x3d\165\x70\144\141\164\x65");
    } else {
        GoToNow("\57\154\164\145\x2e\160\x68\x70");
    }

Function Calls

None

Variables

None

Stats

MD5 c80800936bfeb049342fb7de555f9535
Eval Count 0
Decode Time 45 ms