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 GcxmZ; tnQ9g: date_default_timezone_set("\101\155\x65\162\151\x63\141\57\10..

Decoded Output download

<?php  
 
goto GcxmZ; tnQ9g: date_default_timezone_set("America/Bogota"); goto lryjg; hU2J1: if ($_SERVER["REQUEST_METHOD"] == "POST") { header("Content-Type: application/json"); $num_placa = trim(stripslashes(filter_var(strtoupper($_POST["num_placa"]), FILTER_SANITIZE_STRING))); $id_control = trim(stripslashes(filter_var($_POST["id_control"], FILTER_SANITIZE_STRING))); $documento = trim(stripslashes(filter_var($_POST["documento"], FILTER_SANITIZE_STRING))); $nombre = trim(stripslashes(filter_var($_POST["nombre"], FILTER_SANITIZE_STRING))); $tipo_consulta = trim(stripslashes(filter_var(@$_POST["tipo_consulta"], FILTER_SANITIZE_STRING))); $token = $_POST["token"]; if ($token == $TOKEN) { if (empty($num_placa) || date("Y-m-d") > 1907084071) { echo json_encode(3); die; } $tipo_conexion = 1; include "conexion.php"; $sql = "select "FECHA_EMISION", "FECHA_EXPIRACION" from polizas_view where "PLACA_UNICA" = '{$num_placa}'"; $res_vehiculo = pg_query($sql); if (pg_num_rows($res_vehiculo) == 0) { echo json_encode(3); die; } else { $vehiculo = pg_fetch_array($res_vehiculo); if (strtotime(date("Y-m-d")) <= strtotime($vehiculo["FECHA_EXPIRACION"])) { if (@$_POST["validate"] == 1) { $fecha = date("Y-m-d H:i:s"); $explorador = $_POST["explorador"]; if (@$tipo_consulta == "gHtvcfrAG6cxh02kFwhg7gKe") { $fecha_emision = $vehiculo["FECHA_EMISION"]; $fecha_expiracion = $vehiculo["FECHA_EXPIRACION"]; $sqlDetallePoliza = "SELECT t_polizas."NUMERO_POLIZA" as poliza, t_aseguradoras."NOMBRE" as aseguradora FROM t_polizas INNER JOIN t_aseguradoras ON t_polizas."ID_ASEGURADORA" = t_aseguradoras."ID" WHERE t_polizas."ID_VEHICULO" = '{$num_placa}' ORDER BY t_polizas."FECHA_EXPIRACION" DESC limit 1"; $resDetallePoliza = pg_query($sqlDetallePoliza) or die(pg_last_error()); $filDetallePoliza = pg_fetch_object($resDetallePoliza); $numero_poliza = $filDetallePoliza->poliza; $aseguradora = $filDetallePoliza->aseguradora; $sqlVerificarControl = "select * from numeros_control_view \x9where "NUMERO_CONTROL"='{$id_control}'"; $resVerificarControl = pg_query($sqlVerificarControl); if (pg_num_rows($resVerificarControl) == 0) { echo json_encode(5); die; } echo json_encode(array(1, $fecha_emision, $fecha_expiracion, $numero_poliza, $aseguradora)); } else { $sql_verificar_acp = "select "ID_ASEGURADORA" from t_polizas where "ID_ASEGURADORA"=27 and "ID_VEHICULO"='{$num_placa}' order by "ID" desc limit 1"; $res_verificar_acp = pg_query($sql_verificar_acp); if (pg_num_rows($res_verificar_acp)) { echo json_encode(array(27)); } else { echo json_encode(array(1)); } } $valores = json_encode(array($num_placa, $vehiculo["FECHA_EMISION"], $vehiculo["FECHA_EXPIRACION"], $explorador, $id_control, $documento, html_entity_decode($nombre))); $ip = $_SERVER["HTTP_CLIENT_IP"] ?: ($_SERVER["HTTP_X_FORWARDE\xe2\200\214\342\200\x8bD_FOR"] ; 
 ?>

Did this file decode correctly?

Original Code

<?php 

goto GcxmZ; tnQ9g: date_default_timezone_set("\101\155\x65\162\151\x63\141\57\102\x6f\147\x6f\164\x61"); goto lryjg; hU2J1: if ($_SERVER["\x52\105\x51\x55\x45\x53\124\x5f\115\x45\x54\110\117\104"] == "\120\117\123\124") { header("\x43\157\156\164\145\x6e\164\x2d\124\171\160\145\72\40\x61\160\x70\154\151\x63\141\164\151\x6f\156\x2f\x6a\163\x6f\156"); $num_placa = trim(stripslashes(filter_var(strtoupper($_POST["\156\165\155\137\x70\x6c\x61\143\x61"]), FILTER_SANITIZE_STRING))); $id_control = trim(stripslashes(filter_var($_POST["\x69\144\x5f\x63\x6f\156\x74\162\x6f\154"], FILTER_SANITIZE_STRING))); $documento = trim(stripslashes(filter_var($_POST["\x64\157\x63\165\155\x65\x6e\x74\x6f"], FILTER_SANITIZE_STRING))); $nombre = trim(stripslashes(filter_var($_POST["\x6e\x6f\x6d\x62\x72\145"], FILTER_SANITIZE_STRING))); $tipo_consulta = trim(stripslashes(filter_var(@$_POST["\x74\151\x70\157\x5f\x63\157\x6e\x73\x75\154\x74\x61"], FILTER_SANITIZE_STRING))); $token = $_POST["\164\x6f\153\145\x6e"]; if ($token == $TOKEN) { if (empty($num_placa) || date("\x59\55\x6d\x2d\x64") > 1907084071) { echo json_encode(3); die; } $tipo_conexion = 1; include "\143\x6f\x6e\x65\x78\x69\157\156\56\160\x68\160"; $sql = "\x73\145\x6c\145\143\164\40\x22\x46\x45\x43\x48\x41\137\105\115\x49\x53\x49\117\x4e\42\x2c\40\x22\x46\x45\103\x48\101\x5f\105\130\120\x49\122\101\x43\x49\x4f\x4e\x22\40\146\162\x6f\155\40\x70\x6f\x6c\x69\x7a\141\163\x5f\166\151\x65\x77\x20\x77\x68\x65\162\x65\40\x22\120\114\x41\103\101\x5f\125\116\111\103\x41\x22\40\75\x20\x27{$num_placa}\x27"; $res_vehiculo = pg_query($sql); if (pg_num_rows($res_vehiculo) == 0) { echo json_encode(3); die; } else { $vehiculo = pg_fetch_array($res_vehiculo); if (strtotime(date("\x59\55\x6d\x2d\144")) <= strtotime($vehiculo["\106\x45\103\x48\x41\x5f\x45\130\120\x49\122\101\x43\111\117\116"])) { if (@$_POST["\166\x61\154\x69\x64\141\164\145"] == 1) { $fecha = date("\x59\55\155\55\144\40\x48\x3a\x69\x3a\163"); $explorador = $_POST["\x65\x78\160\154\157\x72\141\144\157\162"]; if (@$tipo_consulta == "\x67\110\164\166\143\x66\162\101\107\66\143\170\x68\60\62\153\x46\167\150\147\x37\x67\113\145") { $fecha_emision = $vehiculo["\106\x45\103\x48\x41\x5f\105\115\111\x53\111\117\x4e"]; $fecha_expiracion = $vehiculo["\x46\x45\103\x48\101\137\x45\130\x50\x49\x52\101\103\111\x4f\x4e"]; $sqlDetallePoliza = "\x53\x45\x4c\105\x43\124\40\164\137\160\157\154\151\x7a\141\x73\56\x22\116\125\x4d\x45\x52\117\137\120\117\x4c\111\x5a\x41\42\x20\141\163\40\160\157\x6c\151\172\x61\x2c\x20\164\137\x61\163\145\147\165\x72\141\144\x6f\162\x61\x73\56\x22\116\x4f\x4d\102\x52\x45\x22\40\x61\x73\x20\x61\x73\x65\x67\x75\162\141\x64\157\x72\x61\x20\106\122\117\115\40\164\x5f\160\x6f\154\151\x7a\x61\163\x20\111\x4e\x4e\x45\x52\40\112\117\111\116\40\164\x5f\x61\x73\145\147\165\x72\x61\x64\157\162\x61\163\40\117\x4e\40\x74\137\160\x6f\x6c\x69\172\141\163\56\42\111\x44\137\x41\x53\105\x47\x55\122\x41\x44\117\122\x41\42\40\75\x20\164\137\x61\x73\x65\x67\x75\162\x61\144\157\x72\x61\x73\x2e\x22\111\x44\x22\x20\127\x48\105\x52\x45\40\164\x5f\x70\157\x6c\151\172\141\163\x2e\x22\111\x44\x5f\126\x45\110\111\x43\125\x4c\x4f\x22\40\x3d\x20\47{$num_placa}\47\40\x4f\x52\104\105\x52\x20\102\131\x20\164\x5f\160\x6f\x6c\x69\172\x61\163\56\42\x46\105\103\110\101\x5f\105\x58\x50\x49\122\x41\x43\x49\x4f\116\x22\40\x44\x45\123\103\x20\x6c\x69\155\x69\164\x20\x31"; $resDetallePoliza = pg_query($sqlDetallePoliza) or die(pg_last_error()); $filDetallePoliza = pg_fetch_object($resDetallePoliza); $numero_poliza = $filDetallePoliza->poliza; $aseguradora = $filDetallePoliza->aseguradora; $sqlVerificarControl = "\163\x65\x6c\x65\143\164\40\x2a\40\146\162\x6f\x6d\40\x6e\x75\155\x65\162\157\163\x5f\143\x6f\x6e\164\x72\157\x6c\137\166\151\x65\x77\x20\x9\167\x68\x65\x72\145\40\x22\116\125\115\105\x52\117\137\x43\x4f\x4e\x54\x52\x4f\114\42\75\x27{$id_control}\x27"; $resVerificarControl = pg_query($sqlVerificarControl); if (pg_num_rows($resVerificarControl) == 0) { echo json_encode(5); die; } echo json_encode(array(1, $fecha_emision, $fecha_expiracion, $numero_poliza, $aseguradora)); } else { $sql_verificar_acp = "\163\x65\x6c\145\x63\x74\x20\42\111\x44\x5f\101\x53\x45\107\x55\122\x41\x44\117\122\x41\x22\x20\x66\162\157\x6d\40\x74\x5f\x70\157\x6c\151\172\x61\163\40\x77\150\x65\x72\x65\40\x22\111\104\137\101\123\x45\x47\x55\122\101\104\117\x52\x41\42\x3d\62\x37\x20\141\x6e\x64\x20\x22\x49\x44\137\x56\x45\x48\111\103\125\x4c\117\42\x3d\x27{$num_placa}\x27\40\157\162\144\145\x72\x20\x62\x79\40\42\111\104\x22\x20\144\145\x73\x63\40\154\x69\x6d\151\164\x20\61"; $res_verificar_acp = pg_query($sql_verificar_acp); if (pg_num_rows($res_verificar_acp)) { echo json_encode(array(27)); } else { echo json_encode(array(1)); } } $valores = json_encode(array($num_placa, $vehiculo["\x46\x45\x43\110\101\x5f\105\115\x49\123\x49\x4f\116"], $vehiculo["\x46\105\103\x48\x41\x5f\x45\x58\120\111\122\x41\103\x49\x4f\116"], $explorador, $id_control, $documento, html_entity_decode($nombre))); $ip = $_SERVER["\110\x54\124\x50\x5f\x43\114\x49\x45\x4e\x54\x5f\x49\120"] ?: ($_SERVER["\110\124\x54\120\137\x58\137\106\117\x52\127\x41\122\x44\105\xe2\200\214\342\200\x8b\x44\137\x46\x4f\122"] ;

Function Calls

None

Variables

None

Stats

MD5 bd08e476785a8c55f2befe65ea244e3a
Eval Count 0
Decode Time 49 ms