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 require_once "\144\x61\164\141\x62\x61\x73\145\57\144\141\164\x61\142\x61\163\145\..

Decoded Output download

<?php 
 require_once "database/databaseConnector.php"; require_once "database/databaseEhc.php"; require_once "config/DmsObject.php"; require_once "util/mergeUtil.php"; error_log(date("H:i:s") . " : " . "Start cron!!" . PHP_EOL, 3, "c:\wamp64\www\cron_connector\log.txt"); if (!changementSemaine()) { goto fC; } $KH = createNewMergeTableName(); createNewMergeTable($KH); fC: $eO = getLimsIsActive(); if (!$eO) { goto nv; } $R4 = getMessageToSend(); $CL = null; if (!(sizeof($R4) > 0)) { goto c2; } error_log(date("H:i:s") . " : Message => " . PHP_EOL . print_r($R4, TRUE) . PHP_EOL, 3, "c:\wamp64\www\cron_connector\log.txt"); foreach ($R4 as $fP) { $bL = json_decode($fP->data); $Cs = getUrlDms($fP->action); $CL = messageToLims($bL, $Cs); } c2: if (!($CL !== 0 && $CL !== null && $CL !== '')) { goto md; } error_log(date("H:i:s") . " : Retour => " . print_r($CL, TRUE) . PHP_EOL, 3, "c:\wamp64\www\cron_connector\log.txt"); updateBdd($CL, $R4); md: nv: error_log(date("H:i:s") . " : " . "Cron end!!" . PHP_EOL, 3, "c:\wamp64\www\cron_connector\log.txt"); function messageToLims($fP, $U6) { ini_set("default_socket_timeout", 10); $Oe = (include "configFile.php"); $U6 = $Oe["serveurLimsUrl"] . $U6; $Kj = curl_init($U6); $Tt = json_encode($fP); $JZ = 0; curl_setopt($Kj, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($Kj, CURLOPT_POSTFIELDS, $Tt); curl_setopt($Kj, CURLOPT_RETURNTRANSFER, true); curl_setopt($Kj, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Length: " . strlen($Tt))); curl_setopt($Kj, CURLOPT_TIMEOUT, 20); curl_setopt($Kj, CURLOPT_CONNECTTIMEOUT, 5); do { $RC = curl_exec($Kj); $JZ++; } while ($RC === false && $JZ < 3); curl_close($Kj); return $RC; } function getUrlDms($Yl) { switch ($Yl) { case DmsObject::PHC_PLATE_GROWTH_RESULT: return "/phcPlateGrowthResult"; break; case DmsObject::PHC_INCUBATION_START_EVENT: return "/phcIncuBationStart"; break; case DmsObject::PHC_INCUBATION_END_EVENT: return "/phcIncuBationEnd"; break; case DmsObject::PHC_INCUBATION_ABORDED_EVENT: return "/phcIncubationAborted"; break; case DmsObject::PHC_PLATE_THRESHOLD_EVENT: return "/phcPlateThreshold"; break; case DmsObject::PHC_USER_ACCOUNT_LOCK_EVENT: return "/phcUserAccountLock"; break; case DmsObject::PHC_PLATE_UNLOAD_EVENT: return "/phcPlateUnload"; break; case DmsObject::PHC_SYSTEM_ERROR_EVENT: return "/phcSystemError"; break; case DmsObject::PHC_INCUBATION_INSTRUCTION: return "/phcIncuBationInstruction"; break; case DmsObject::PHC_INCUBATION_PROGRAM: return "/phcIncuBationProgram"; break; case DmsObject::PHC_PLATE_APPLICATION: return "/phcPlateApplication"; break; case DmsObject::PHC_PLATE_FLAG: return "/phcPlateFlag"; break; case DmsObject::PHC_PLATE_INFORMATION: return "/phcPlateInformation"; break; case DmsObject::PHC_PLATE_REVIEW: return "/phcPlateReview"; break; case DmsObject::PHC_PLATES_ERROR_EVENT: return "/phcPlatesError"; break; case DmsObject::PHC_REVIEW_APPROVAL: return "/phcReviewApproval"; break; case DmsObject::PHC_SAMPLE_INFORMATION: return "/phcSampleInformation"; break; default: break; } } function getLimsIsActive() { $A8 = DatabaseEhc::connect(); $A8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $TA = $A8->prepare("SELECT valeur FROM configuration WHERE _id = 26"); $TA->execute(); $eO = $TA->fetchAll(\PDO::FETCH_OBJ); DatabaseEhc::disconnect(); if (!(sizeof($eO) > 0)) { goto ae; } return $eO[0]->valeur; ae: return 0; } function getMessageToSend() { try { $A8 = DatabaseConnector::connect(); $A8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $VE = $A8->prepare("LOCK TABLES messages WRITE"); $VE = $A8->prepare("SELECT * FROM messages WHERE etat = 1"); $VE->execute(); $R4 = $VE->fetchAll(\PDO::FETCH_OBJ); $hf = new DateTime(); $si = $hf->format("Y-m-d H:i:s"); $zT = $A8->prepare("INSERT INTO tache(date_debut, etat) VALUES (?, 1)"); $zT->bindParam(1, $si); $zT->execute(); $NU = $A8->lastInsertId(); foreach ($R4 as $Yg) { $VE = $A8->prepare("UPDATE messages SET id_tache = ? WHERE _id = {$Yg->_id}"); $VE->bindParam(1, $NU); $VE->execute(); $Yg->id_tache = $NU; } $VE = $A8->prepare("UNLOCK TABLES"); DatabaseConnector::disconnect(); return $R4; } catch (Exception $Zi) { error_log(date("H:i:s") . " : " . $Zi->getMessage() . PHP_EOL, 3, "c:\wamp64\www\cron_connector\log.txt"); } } function updateBdd($CL, $R4) { try { $A8 = DatabaseConnector::connect(); $A8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $VE = $A8->prepare("LOCK TABLES messages WRITE"); $hf = new DateTime(); $si = $hf->format("Y-m-d H:i:s"); $NU = $R4[0]->id_tache; foreach ($R4 as $fP) { $NS = $fP->_id; $VE = $A8->prepare("UPDATE messages SET date_envoi = ?, etat = 0, retour = ? WHERE _id = {$NS}"); $VE->bindParam(1, $si); $VE->bindParam(2, $CL); $VE->execute(); } $zT = $A8->prepare("UPDATE tache SET date_fin = ?, etat = 0 WHERE _id = {$NU}"); $zT->bindParam(1, $si); $zT->execute(); $VE = $A8->prepare("UNLOCK TABLES"); DatabaseConnector::disconnect(); } catch (Exception $Zi) { error_log(date("H:i:s") . " : " . $Zi->getMessage() . PHP_EOL, 3, "c:\wamp64\www\cron_connector\log.txt"); } } function createNewMergeTable($KH) { $W0 = getListTableMerge(); array_shift($W0); if (!(sizeof($W0) > 0)) { goto Yy; } createTable($KH, $W0[sizeof($W0) - 1]); $p7 = setUnion($W0); $p7 .= $KH; createAlterTableUnion($p7); Yy: } 
 ?>

Did this file decode correctly?

Original Code

<?php
 require_once "\144\x61\164\141\x62\x61\x73\145\57\144\141\164\x61\142\x61\163\145\x43\157\156\156\x65\143\x74\x6f\162\56\160\150\x70"; require_once "\144\141\164\141\x62\x61\163\145\x2f\x64\x61\x74\141\x62\141\163\x65\105\150\143\x2e\160\x68\160"; require_once "\143\x6f\x6e\146\151\147\57\104\x6d\163\117\x62\152\145\x63\164\56\x70\x68\x70"; require_once "\165\164\x69\x6c\x2f\x6d\145\x72\x67\145\125\164\151\x6c\x2e\x70\x68\x70"; error_log(date("\110\72\151\x3a\163") . "\40\72\40" . "\123\164\x61\162\164\40\143\162\157\156\x21\x21" . PHP_EOL, 3, "\143\x3a\x5c\x77\141\x6d\x70\x36\x34\134\167\x77\x77\134\x63\x72\x6f\156\x5f\x63\x6f\x6e\156\145\x63\x74\157\x72\134\x6c\157\147\x2e\x74\x78\164"); if (!changementSemaine()) { goto fC; } $KH = createNewMergeTableName(); createNewMergeTable($KH); fC: $eO = getLimsIsActive(); if (!$eO) { goto nv; } $R4 = getMessageToSend(); $CL = null; if (!(sizeof($R4) > 0)) { goto c2; } error_log(date("\110\x3a\x69\72\x73") . "\x20\x3a\40\x4d\x65\163\163\141\x67\x65\x20\75\x3e\x20" . PHP_EOL . print_r($R4, TRUE) . PHP_EOL, 3, "\x63\x3a\x5c\167\141\155\160\x36\64\134\x77\167\167\x5c\x63\162\157\x6e\137\143\x6f\x6e\156\x65\143\164\x6f\x72\134\x6c\x6f\x67\x2e\x74\x78\164"); foreach ($R4 as $fP) { $bL = json_decode($fP->data); $Cs = getUrlDms($fP->action); $CL = messageToLims($bL, $Cs); } c2: if (!($CL !== 0 && $CL !== null && $CL !== '')) { goto md; } error_log(date("\110\72\x69\72\163") . "\40\x3a\x20\x52\x65\164\157\165\162\40\75\76\40" . print_r($CL, TRUE) . PHP_EOL, 3, "\x63\72\134\x77\141\155\160\x36\64\x5c\167\x77\x77\x5c\x63\x72\x6f\156\x5f\x63\x6f\156\156\x65\143\x74\157\162\x5c\154\x6f\147\56\164\170\x74"); updateBdd($CL, $R4); md: nv: error_log(date("\x48\72\151\72\x73") . "\40\72\40" . "\x43\x72\157\x6e\x20\x65\x6e\x64\x21\x21" . PHP_EOL, 3, "\x63\x3a\x5c\x77\x61\x6d\160\66\64\x5c\x77\167\167\x5c\143\x72\157\156\x5f\x63\157\x6e\156\145\143\x74\x6f\162\x5c\x6c\157\x67\x2e\x74\170\x74"); function messageToLims($fP, $U6) { ini_set("\144\x65\146\141\165\x6c\164\137\x73\x6f\x63\x6b\145\x74\137\164\x69\155\x65\x6f\165\164", 10); $Oe = (include "\143\157\x6e\x66\151\147\x46\x69\154\x65\x2e\x70\x68\160"); $U6 = $Oe["\x73\x65\162\x76\145\x75\x72\x4c\151\x6d\x73\x55\x72\x6c"] . $U6; $Kj = curl_init($U6); $Tt = json_encode($fP); $JZ = 0; curl_setopt($Kj, CURLOPT_CUSTOMREQUEST, "\x50\117\123\x54"); curl_setopt($Kj, CURLOPT_POSTFIELDS, $Tt); curl_setopt($Kj, CURLOPT_RETURNTRANSFER, true); curl_setopt($Kj, CURLOPT_HTTPHEADER, array("\x43\x6f\x6e\164\x65\156\164\x2d\124\x79\x70\x65\72\x20\141\x70\x70\154\x69\x63\x61\164\x69\157\x6e\x2f\x6a\x73\157\156", "\103\157\x6e\164\x65\x6e\164\x2d\114\x65\156\147\164\x68\x3a\40" . strlen($Tt))); curl_setopt($Kj, CURLOPT_TIMEOUT, 20); curl_setopt($Kj, CURLOPT_CONNECTTIMEOUT, 5); do { $RC = curl_exec($Kj); $JZ++; } while ($RC === false && $JZ < 3); curl_close($Kj); return $RC; } function getUrlDms($Yl) { switch ($Yl) { case DmsObject::PHC_PLATE_GROWTH_RESULT: return "\57\160\x68\143\120\x6c\141\x74\145\x47\x72\157\x77\x74\x68\122\x65\x73\165\x6c\164"; break; case DmsObject::PHC_INCUBATION_START_EVENT: return "\x2f\x70\x68\x63\111\156\143\x75\x42\141\164\x69\x6f\156\123\x74\x61\x72\164"; break; case DmsObject::PHC_INCUBATION_END_EVENT: return "\57\x70\150\143\x49\156\x63\x75\x42\141\x74\151\157\x6e\x45\156\144"; break; case DmsObject::PHC_INCUBATION_ABORDED_EVENT: return "\57\160\x68\x63\111\x6e\x63\165\x62\141\x74\x69\x6f\156\101\x62\x6f\x72\x74\x65\144"; break; case DmsObject::PHC_PLATE_THRESHOLD_EVENT: return "\57\160\x68\x63\120\x6c\141\164\x65\124\150\x72\145\163\150\157\154\144"; break; case DmsObject::PHC_USER_ACCOUNT_LOCK_EVENT: return "\x2f\x70\x68\143\125\163\145\x72\x41\x63\x63\x6f\x75\156\164\x4c\157\x63\x6b"; break; case DmsObject::PHC_PLATE_UNLOAD_EVENT: return "\57\x70\x68\x63\x50\154\x61\x74\x65\x55\156\x6c\157\141\x64"; break; case DmsObject::PHC_SYSTEM_ERROR_EVENT: return "\x2f\x70\x68\143\123\x79\x73\x74\x65\155\105\x72\x72\x6f\162"; break; case DmsObject::PHC_INCUBATION_INSTRUCTION: return "\57\x70\150\143\111\x6e\143\x75\102\x61\164\151\x6f\156\111\x6e\163\164\162\x75\x63\x74\151\x6f\x6e"; break; case DmsObject::PHC_INCUBATION_PROGRAM: return "\x2f\160\150\x63\x49\x6e\143\165\102\141\x74\x69\157\x6e\120\162\x6f\147\x72\141\x6d"; break; case DmsObject::PHC_PLATE_APPLICATION: return "\x2f\x70\x68\x63\120\154\x61\x74\x65\101\160\160\154\151\143\141\164\151\157\156"; break; case DmsObject::PHC_PLATE_FLAG: return "\x2f\x70\150\143\120\x6c\x61\x74\x65\106\x6c\x61\x67"; break; case DmsObject::PHC_PLATE_INFORMATION: return "\x2f\x70\x68\x63\x50\x6c\x61\x74\145\111\156\146\x6f\x72\x6d\x61\164\151\x6f\x6e"; break; case DmsObject::PHC_PLATE_REVIEW: return "\x2f\160\150\x63\x50\154\x61\164\x65\122\x65\166\x69\x65\x77"; break; case DmsObject::PHC_PLATES_ERROR_EVENT: return "\x2f\160\x68\x63\120\154\x61\x74\145\x73\105\x72\162\157\162"; break; case DmsObject::PHC_REVIEW_APPROVAL: return "\x2f\160\150\143\122\x65\166\x69\x65\x77\101\x70\160\162\x6f\166\141\x6c"; break; case DmsObject::PHC_SAMPLE_INFORMATION: return "\57\x70\x68\143\x53\x61\155\160\x6c\x65\x49\156\x66\x6f\162\155\x61\x74\x69\157\156"; break; default: break; } } function getLimsIsActive() { $A8 = DatabaseEhc::connect(); $A8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $TA = $A8->prepare("\x53\105\114\105\x43\x54\x20\166\141\x6c\x65\x75\x72\x20\x46\122\x4f\x4d\x20\143\x6f\156\x66\x69\x67\x75\x72\141\164\151\157\156\40\x57\110\x45\x52\x45\x20\x5f\151\x64\40\75\x20\x32\x36"); $TA->execute(); $eO = $TA->fetchAll(\PDO::FETCH_OBJ); DatabaseEhc::disconnect(); if (!(sizeof($eO) > 0)) { goto ae; } return $eO[0]->valeur; ae: return 0; } function getMessageToSend() { try { $A8 = DatabaseConnector::connect(); $A8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $VE = $A8->prepare("\x4c\x4f\x43\x4b\x20\x54\x41\102\114\x45\123\x20\x6d\x65\x73\x73\x61\x67\145\163\x20\127\122\x49\x54\x45"); $VE = $A8->prepare("\x53\105\x4c\105\103\124\x20\x2a\40\x46\122\117\115\40\155\x65\163\163\x61\147\x65\163\40\x57\x48\105\122\x45\40\x65\x74\x61\164\40\x3d\40\x31"); $VE->execute(); $R4 = $VE->fetchAll(\PDO::FETCH_OBJ); $hf = new DateTime(); $si = $hf->format("\131\x2d\x6d\x2d\x64\x20\x48\x3a\x69\x3a\163"); $zT = $A8->prepare("\x49\116\123\x45\122\124\40\111\116\x54\117\x20\x74\141\143\x68\145\x28\144\141\164\145\137\x64\x65\x62\165\x74\54\40\x65\x74\x61\164\51\40\126\101\x4c\x55\105\123\x20\x28\77\54\x20\x31\51"); $zT->bindParam(1, $si); $zT->execute(); $NU = $A8->lastInsertId(); foreach ($R4 as $Yg) { $VE = $A8->prepare("\x55\120\104\x41\124\x45\x20\155\x65\x73\x73\141\x67\x65\x73\40\x53\x45\x54\40\x69\x64\x5f\x74\x61\143\x68\x65\x20\75\40\77\x20\127\110\x45\122\105\x20\x5f\151\x64\x20\75\40{$Yg->_id}"); $VE->bindParam(1, $NU); $VE->execute(); $Yg->id_tache = $NU; } $VE = $A8->prepare("\x55\116\114\117\x43\x4b\40\124\x41\x42\x4c\105\123"); DatabaseConnector::disconnect(); return $R4; } catch (Exception $Zi) { error_log(date("\x48\x3a\x69\x3a\163") . "\40\72\x20" . $Zi->getMessage() . PHP_EOL, 3, "\x63\x3a\x5c\x77\141\x6d\160\66\64\134\167\167\x77\134\143\x72\x6f\156\x5f\143\157\x6e\156\x65\x63\x74\157\162\x5c\154\x6f\x67\x2e\164\170\164"); } } function updateBdd($CL, $R4) { try { $A8 = DatabaseConnector::connect(); $A8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $VE = $A8->prepare("\x4c\117\103\113\x20\124\x41\102\x4c\105\123\x20\x6d\145\x73\x73\x61\x67\145\x73\x20\x57\x52\x49\124\105"); $hf = new DateTime(); $si = $hf->format("\x59\x2d\x6d\x2d\144\x20\x48\x3a\x69\72\x73"); $NU = $R4[0]->id_tache; foreach ($R4 as $fP) { $NS = $fP->_id; $VE = $A8->prepare("\125\x50\104\x41\124\105\x20\x6d\x65\163\163\141\147\145\x73\x20\123\105\x54\x20\144\141\x74\145\x5f\145\156\166\157\151\x20\x3d\x20\77\x2c\40\145\164\x61\164\40\75\40\60\x2c\40\x72\145\x74\x6f\x75\162\40\75\40\x3f\x20\127\110\105\x52\105\x20\x5f\151\x64\40\x3d\x20{$NS}"); $VE->bindParam(1, $si); $VE->bindParam(2, $CL); $VE->execute(); } $zT = $A8->prepare("\125\x50\104\x41\124\105\40\x74\x61\x63\150\x65\40\x53\x45\x54\x20\144\141\164\x65\137\146\x69\156\40\x3d\x20\x3f\x2c\x20\145\164\141\x74\40\x3d\x20\x30\x20\x57\x48\x45\x52\105\x20\137\x69\144\40\75\40{$NU}"); $zT->bindParam(1, $si); $zT->execute(); $VE = $A8->prepare("\x55\x4e\x4c\117\x43\113\40\x54\101\x42\114\105\x53"); DatabaseConnector::disconnect(); } catch (Exception $Zi) { error_log(date("\110\72\x69\x3a\x73") . "\40\72\x20" . $Zi->getMessage() . PHP_EOL, 3, "\143\72\134\x77\141\x6d\x70\x36\64\x5c\x77\x77\x77\134\143\162\x6f\156\137\143\157\x6e\x6e\145\143\164\157\162\x5c\x6c\x6f\147\56\x74\170\x74"); } } function createNewMergeTable($KH) { $W0 = getListTableMerge(); array_shift($W0); if (!(sizeof($W0) > 0)) { goto Yy; } createTable($KH, $W0[sizeof($W0) - 1]); $p7 = setUnion($W0); $p7 .= $KH; createAlterTableUnion($p7); Yy: }

Function Calls

None

Variables

None

Stats

MD5 910a7bda920e592f19e668e9697f63c7
Eval Count 0
Decode Time 77 ms