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 qt3S5; XOZMQ: require_once "\153\x65\x72\156\145\154\57\144\142\137\150\145\..

Decoded Output download

<?php 
goto qt3S5; 
XOZMQ: 
require_once "kernel/db_helper_RD_V2.php"; 
goto kT7pg; 
mohcN: 
if (isset($req_data["timeframe"])) { 
    if (!isset($req_data["start_date"])) { 
        $start_date = date("Y-m-d", strtotime(date("Y-m-d") . "  - 1 month")); 
    } else { 
        $start_date = date("Y-m-d", strtotime($req_data["start_date"])); 
    } 
    if (!isset($req_data["end_date"])) { 
        $end_date = date("Y-m-d", strtotime(date("Y-m-d"))); 
    } else { 
        $end_date = date("Y-m-d", strtotime($req_data["end_date"])); 
    } 
    $query .= " and txn__visiting_pass.entry_date_time between '{$start_date} 00-00-00' and '{$end_date} 23-59-59'"; 
} 
goto Qjdv0; 
OWpZU: 
ini_set("display_startup_errors", 1); 
goto xjZ_8; 
YuZ6W: 
while ($data = $db_result->fetch(PDO::FETCH_ASSOC)) { 
    $query_del = "delete from txn__visiting_pass where visiting_pass_id='" . $data["visiting_pass_id"] . "';"; 
    if (!db_execute_query($query_del)) { 
        echo "database error!201"; 
        return; 
    } else { 
        @unlink("img/visitors/" . $data["visiting_pass_id"] . ".png"); 
    } 
} 
goto hC8wM; 
Jy_Cy: 
if ($req_data["timeframe"] == 101 and !isset($req_data["date"])) { 
    echo "Please select the specific date!201"; 
    return; 
} 
goto K2fGi; 
aE2IJ: 
require_once "kernel/utils.php"; 
goto ygBRR; 
WBwkl: 
if (isset($req_data["approval_status"]) and $req_data["approval_status"] <= 5) { 
    if ($req_data["approval_status"] == "1") { 
        $query .= "(txn__visiting_pass.approval_status='1' OR txn__visiting_pass.approval_status='3' OR txn__visiting_pass.approval_status='4')"; 
    } else { 
        if ($req_data["approval_status"] == "99") { 
            $query .= "txn__visiting_pass.approval_status like '%'"; 
        } else { 
            $query .= "txn__visiting_pass.approval_status='" . $req_data["approval_status"] . "'"; 
        } 
    } 
} else { 
    $query .= "txn__visiting_pass.approval_status like '%'"; 
} 
goto I64W5; 
ygBRR: 
require_once "kernel/param.php"; 
goto u9oRk; 
N7pb9: 
$req_data = sanitize(); 
goto BYs3s; 
ZMZ0e: 
if ($db_result === FALSE) { 
    echo "database error!201"; 
    return; 
} 
goto G1GBe; 
kw2Xy: 
require_once "kernel/db.php"; 
goto aE2IJ; 
JFqDZ: 
require_once "kernel/db_helper_UT_V2.php"; 
goto Z8VE5; 
Z8VE5: 
require_once "kernel/db_helper_RW_V2.php"; 
goto u8fLH; 
K2fGi: 
$query = "select FROM `txn__visiting_pass` INNER JOIN master__visitor on txn__visiting_pass.visitor_id=master__visitor.visitor_id INNER join master__emp on txn__visiting_pass.visitee_id=master__emp.emp_id INNER join master__department on master__emp.department_id=master__department.department_id left outer join master__location on txn__visiting_pass.location_id=master__location.location_id where "; 
goto WBwkl; 
u8fLH: 
require_once "kernel/db_helper_RW.php"; 
goto XOZMQ; 
slolE: 
if (check_auth("ADMIN") == false) { 
    echo "<js>alert('Youre not authorized to view this page!');window.location.href = 'index_signed.php';</js>"; 
    return; 
} 
goto N7pb9; 
q20xU: 
if (isset($req_data["user_name"])) { 
    $query .= " and user_name = '" . $req_data["user_name"] . "'"; 
} 
goto mohcN; 
qt3S5: 
ini_set("display_errors", 1); 
goto OWpZU; 
wV6Xo: 
if (!isset($_SESSION)) { 
    session_start(); 
} 
goto GtiBd; 
DW12X: 
if (isset($req_data["dept"])) { 
    $query .= " and master__department.department_id = '" . $req_data["dept"] . "'"; 
} 
goto q20xU; 
hC8wM: 
echo $pass_count . " visitor pass deleted!201"; 
goto bx_I7; 
I64W5: 
if (isset($req_data["loc"])) { 
    $query .= " and txn__visiting_pass.location_id = '" . $req_data["loc"] . "'"; 
} 
goto DW12X; 
GtiBd: 
require_once "phpqrcode/qrlib.php"; 
goto kw2Xy; 
G1GBe: 
$pass_count = $db_result->rowCount(); 
goto YuZ6W; 
xjZ_8: 
error_reporting(E_ALL); 
goto wV6Xo; 
u9oRk: 
require_once "kernel/whatsapp_api.php"; 
goto JFqDZ; 
Qjdv0: 
if (isset($req_data["visiting_pass_id"])) { 
    $query .= " and visiting_pass_id = '" . $req_data["visiting_pass_id"] . "'"; 
} 
goto OO2fK; 
pAPOp: 
if ($db_result === NULL) { 
    echo "Nothing to delete!201"; 
    return; 
} 
goto ZMZ0e; 
kT7pg: 
if (!check_login()) { 
    echo "510"; 
    return; 
} 
goto slolE; 
BYs3s: 
if (!isset($req_data["timeframe"])) { 
    echo "Please select timeframe!201"; 
    return; 
} 
goto Jy_Cy; 
OO2fK: 
$db_result = select_from_table_V2($query); 
goto pAPOp; 
bx_I7: 
 ?>

Did this file decode correctly?

Original Code

<?php
goto qt3S5;
XOZMQ:
require_once "\153\x65\x72\156\145\154\57\144\142\137\150\145\x6c\160\145\x72\137\x52\x44\137\x56\x32\x2e\x70\150\x70";
goto kT7pg;
mohcN:
if (isset($req_data["\x74\x69\155\x65\x66\162\141\155\x65"])) {
    if (!isset($req_data["\163\164\141\x72\x74\x5f\x64\141\164\145"])) {
        $start_date = date("\x59\x2d\x6d\x2d\144", strtotime(date("\131\x2d\x6d\55\144") . "\40\x20\55\40\x31\x20\x6d\x6f\156\x74\x68"));
    } else {
        $start_date = date("\131\x2d\155\55\x64", strtotime($req_data["\x73\x74\x61\162\x74\137\144\x61\x74\145"]));
    }
    if (!isset($req_data["\x65\x6e\144\137\x64\141\x74\145"])) {
        $end_date = date("\x59\x2d\x6d\55\x64", strtotime(date("\x59\55\x6d\x2d\144")));
    } else {
        $end_date = date("\x59\x2d\x6d\x2d\144", strtotime($req_data["\x65\156\x64\x5f\144\x61\164\145"]));
    }
    $query .= "\x20\141\x6e\144\40\164\170\156\137\x5f\166\x69\163\151\x74\x69\156\x67\137\x70\141\163\163\56\x65\156\164\162\x79\137\144\x61\x74\145\137\x74\151\155\145\40\x62\145\x74\167\145\145\x6e\x20\47{$start_date}\x20\x30\60\55\x30\60\x2d\x30\60\x27\40\x61\x6e\x64\x20\47{$end_date}\x20\x32\x33\x2d\x35\71\55\x35\x39\47";
}
goto Qjdv0;
OWpZU:
ini_set("\x64\151\x73\x70\154\x61\171\x5f\x73\164\141\162\x74\x75\160\137\x65\x72\x72\x6f\162\x73", 1);
goto xjZ_8;
YuZ6W:
while ($data = $db_result->fetch(PDO::FETCH_ASSOC)) {
    $query_del = "\x64\145\x6c\145\164\x65\40\x66\x72\x6f\155\40\164\x78\x6e\x5f\x5f\166\151\163\x69\x74\151\156\x67\137\160\141\163\163\40\x77\x68\x65\x72\x65\40\166\151\163\151\164\x69\x6e\x67\137\160\x61\163\x73\x5f\x69\144\x3d\x27" . $data["\166\x69\163\x69\x74\151\156\147\137\160\141\163\x73\x5f\x69\x64"] . "\47\x3b";
    if (!db_execute_query($query_del)) {
        echo "\x64\x61\x74\141\x62\x61\x73\x65\x20\145\162\162\157\162\x21\x32\60\x31";
        return;
    } else {
        @unlink("\x69\155\147\x2f\x76\x69\x73\x69\164\157\x72\x73\57" . $data["\x76\x69\x73\151\x74\151\156\x67\137\160\x61\163\x73\137\x69\144"] . "\x2e\x70\x6e\x67");
    }
}
goto hC8wM;
Jy_Cy:
if ($req_data["\x74\x69\x6d\145\x66\162\141\x6d\145"] == 101 and !isset($req_data["\x64\x61\164\145"])) {
    echo "\120\154\145\141\163\x65\40\x73\x65\x6c\145\x63\x74\x20\x74\150\x65\40\x73\160\x65\x63\151\x66\151\x63\x20\144\141\x74\x65\x21\x32\x30\x31";
    return;
}
goto K2fGi;
aE2IJ:
require_once "\153\x65\162\156\145\154\57\165\164\151\154\163\x2e\x70\150\160";
goto ygBRR;
WBwkl:
if (isset($req_data["\x61\x70\x70\162\157\166\141\x6c\137\x73\164\141\x74\x75\x73"]) and $req_data["\x61\160\160\162\x6f\166\x61\x6c\137\x73\164\141\x74\165\163"] <= 5) {
    if ($req_data["\x61\160\x70\162\157\x76\141\154\137\x73\164\141\164\x75\163"] == "\x31") {
        $query .= "\50\164\x78\x6e\137\x5f\166\x69\x73\x69\164\x69\156\147\x5f\x70\x61\163\x73\56\141\x70\160\x72\157\x76\x61\x6c\137\163\x74\141\164\x75\x73\x3d\x27\61\x27\40\x4f\122\x20\x74\x78\156\x5f\137\166\x69\163\151\x74\151\156\x67\137\160\141\x73\x73\56\x61\160\x70\x72\157\166\141\x6c\x5f\x73\164\x61\164\x75\x73\75\47\x33\x27\40\x4f\x52\x20\164\170\x6e\137\137\166\151\163\x69\164\151\x6e\x67\137\160\141\x73\x73\x2e\x61\x70\x70\x72\157\x76\x61\x6c\137\163\x74\141\x74\x75\163\x3d\47\64\47\x29";
    } else {
        if ($req_data["\141\160\x70\x72\157\166\x61\154\137\x73\x74\141\164\165\x73"] == "\x39\x39") {
            $query .= "\164\x78\156\x5f\137\166\151\163\x69\164\x69\156\x67\x5f\160\141\163\163\x2e\x61\160\x70\162\157\x76\141\154\137\x73\164\141\164\x75\163\x20\154\x69\153\x65\x20\47\45\x27";
        } else {
            $query .= "\164\170\x6e\x5f\x5f\166\151\163\x69\164\151\x6e\x67\x5f\x70\x61\163\x73\x2e\x61\160\x70\x72\x6f\166\141\154\x5f\163\x74\141\164\165\163\75\47" . $req_data["\x61\x70\x70\162\x6f\166\141\x6c\x5f\163\x74\141\x74\x75\x73"] . "\47";
        }
    }
} else {
    $query .= "\164\x78\x6e\x5f\137\166\151\x73\x69\164\151\x6e\147\137\x70\x61\163\x73\x2e\x61\x70\160\x72\x6f\x76\141\x6c\x5f\x73\x74\141\x74\165\163\x20\x6c\x69\153\x65\40\47\45\x27";
}
goto I64W5;
ygBRR:
require_once "\153\145\x72\x6e\145\x6c\x2f\160\141\x72\x61\155\56\x70\150\160";
goto u9oRk;
N7pb9:
$req_data = sanitize();
goto BYs3s;
ZMZ0e:
if ($db_result === FALSE) {
    echo "\144\x61\x74\x61\x62\141\x73\x65\x20\x65\x72\162\157\x72\41\62\x30\x31";
    return;
}
goto G1GBe;
kw2Xy:
require_once "\x6b\145\162\156\x65\x6c\57\144\142\x2e\160\150\160";
goto aE2IJ;
JFqDZ:
require_once "\x6b\x65\162\x6e\x65\x6c\x2f\144\142\137\150\145\x6c\x70\145\x72\x5f\125\x54\137\x56\x32\x2e\x70\x68\160";
goto Z8VE5;
Z8VE5:
require_once "\x6b\x65\162\x6e\x65\154\57\x64\142\x5f\x68\145\154\160\145\162\137\x52\127\x5f\x56\62\x2e\x70\150\160";
goto u8fLH;
K2fGi:
$query = "\163\145\x6c\145\x63\164\40\x46\x52\x4f\x4d\x20\x60\x74\x78\x6e\137\137\x76\151\x73\151\x74\151\x6e\147\x5f\160\141\163\x73\x60\40\111\116\116\105\x52\40\112\117\x49\x4e\x20\x6d\141\x73\x74\145\162\x5f\137\166\151\163\x69\164\x6f\162\x20\x6f\156\x20\164\170\x6e\137\137\x76\x69\x73\151\x74\x69\x6e\147\137\x70\141\163\163\x2e\166\x69\163\151\164\157\x72\x5f\151\x64\x3d\x6d\141\x73\x74\145\162\137\137\166\151\163\151\164\157\162\x2e\x76\151\x73\x69\164\157\162\x5f\x69\144\x20\111\x4e\x4e\x45\122\x20\152\157\151\156\x20\x6d\x61\x73\164\x65\x72\x5f\x5f\145\155\x70\40\x6f\156\x20\164\x78\156\137\x5f\x76\151\x73\151\164\x69\x6e\147\x5f\160\x61\163\163\x2e\x76\151\163\x69\x74\145\x65\x5f\151\144\x3d\x6d\141\163\164\145\162\137\x5f\145\x6d\160\56\145\155\x70\137\x69\144\x20\111\x4e\x4e\x45\122\x20\x6a\x6f\151\156\40\x6d\141\163\164\145\162\x5f\x5f\x64\145\x70\141\162\x74\x6d\x65\156\164\40\157\x6e\40\x6d\x61\163\x74\x65\x72\137\x5f\145\155\x70\x2e\144\145\160\141\162\x74\155\145\156\x74\x5f\x69\144\75\x6d\x61\x73\164\145\x72\137\x5f\x64\145\160\141\162\164\x6d\x65\x6e\164\56\x64\x65\160\141\x72\x74\155\x65\x6e\164\x5f\x69\x64\x20\x6c\145\146\x74\x20\157\165\x74\145\x72\40\x6a\157\151\x6e\40\x6d\141\163\164\145\x72\x5f\x5f\x6c\x6f\x63\141\164\x69\157\156\x20\157\156\40\164\170\x6e\x5f\137\x76\x69\163\x69\x74\x69\x6e\x67\137\160\141\x73\163\56\154\x6f\143\x61\164\151\157\156\137\x69\x64\75\x6d\141\163\x74\145\162\x5f\x5f\x6c\157\x63\141\x74\x69\x6f\156\x2e\x6c\x6f\143\x61\x74\151\157\156\137\151\x64\x20\x77\150\x65\x72\x65\40";
goto WBwkl;
u8fLH:
require_once "\x6b\145\x72\x6e\145\x6c\x2f\x64\x62\x5f\150\x65\154\160\x65\x72\x5f\x52\127\x2e\160\150\x70";
goto XOZMQ;
slolE:
if (check_auth("\101\104\115\111\x4e") == false) {
    echo "\74\x6a\x73\x3e\141\154\145\162\164\50\47\x59\x6f\x75\162\145\x20\156\157\164\40\141\165\x74\150\x6f\162\x69\172\x65\x64\x20\164\x6f\x20\166\151\145\x77\x20\164\150\151\163\40\x70\141\147\x65\x21\x27\x29\73\167\x69\156\144\x6f\167\x2e\154\157\x63\x61\164\x69\157\x6e\x2e\150\162\145\x66\40\75\40\x27\151\156\x64\145\170\x5f\163\151\x67\x6e\x65\x64\56\160\150\x70\x27\x3b\x3c\x2f\152\163\x3e";
    return;
}
goto N7pb9;
q20xU:
if (isset($req_data["\165\163\145\162\x5f\156\x61\155\145"])) {
    $query .= "\x20\x61\x6e\144\x20\165\x73\x65\162\137\x6e\x61\x6d\x65\40\x3d\40\x27" . $req_data["\165\x73\x65\162\137\x6e\141\155\145"] . "\47";
}
goto mohcN;
qt3S5:
ini_set("\x64\151\163\x70\x6c\x61\171\x5f\145\x72\x72\157\162\163", 1);
goto OWpZU;
wV6Xo:
if (!isset($_SESSION)) {
    session_start();
}
goto GtiBd;
DW12X:
if (isset($req_data["\x64\145\160\x74"])) {
    $query .= "\40\x61\x6e\x64\40\155\141\x73\x74\145\x72\137\137\x64\145\x70\141\x72\x74\x6d\x65\x6e\x74\x2e\x64\x65\x70\x61\162\164\155\x65\156\x74\x5f\x69\144\40\75\40\47" . $req_data["\144\x65\x70\164"] . "\47";
}
goto q20xU;
hC8wM:
echo $pass_count . "\x20\166\151\163\x69\164\x6f\162\x20\x70\x61\163\163\40\x64\x65\x6c\x65\x74\x65\x64\x21\x32\x30\x31";
goto bx_I7;
I64W5:
if (isset($req_data["\x6c\157\x63"])) {
    $query .= "\40\x61\x6e\x64\40\x74\170\x6e\x5f\x5f\x76\151\163\x69\164\151\x6e\x67\137\x70\141\163\x73\56\154\157\x63\x61\x74\151\x6f\156\137\151\x64\40\x3d\x20\47" . $req_data["\x6c\x6f\143"] . "\x27";
}
goto DW12X;
GtiBd:
require_once "\x70\150\x70\x71\x72\x63\157\x64\145\57\x71\162\154\x69\142\56\x70\150\x70";
goto kw2Xy;
G1GBe:
$pass_count = $db_result->rowCount();
goto YuZ6W;
xjZ_8:
error_reporting(E_ALL);
goto wV6Xo;
u9oRk:
require_once "\x6b\145\x72\x6e\x65\154\57\x77\150\x61\164\163\x61\x70\x70\x5f\141\x70\x69\x2e\160\x68\x70";
goto JFqDZ;
Qjdv0:
if (isset($req_data["\166\151\x73\151\164\151\156\x67\x5f\x70\141\x73\163\137\x69\144"])) {
    $query .= "\40\x61\x6e\144\x20\x76\x69\x73\151\164\x69\x6e\x67\x5f\160\x61\163\163\x5f\x69\144\x20\x3d\40\47" . $req_data["\x76\x69\163\151\x74\151\x6e\147\137\160\141\163\x73\137\151\x64"] . "\47";
}
goto OO2fK;
pAPOp:
if ($db_result === NULL) {
    echo "\x4e\157\164\150\151\156\x67\40\164\x6f\x20\144\145\154\x65\x74\145\x21\x32\x30\x31";
    return;
}
goto ZMZ0e;
kT7pg:
if (!check_login()) {
    echo "\65\x31\60";
    return;
}
goto slolE;
BYs3s:
if (!isset($req_data["\x74\151\155\145\146\x72\141\x6d\x65"])) {
    echo "\120\154\145\141\x73\x65\x20\x73\145\x6c\145\143\x74\40\x74\x69\155\145\x66\162\x61\x6d\145\41\62\60\x31";
    return;
}
goto Jy_Cy;
OO2fK:
$db_result = select_from_table_V2($query);
goto pAPOp;
bx_I7:

Function Calls

None

Variables

None

Stats

MD5 6df35fb418fc36ef4c649a09171a77e4
Eval Count 0
Decode Time 104 ms