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 //Encoded eval(gzinflate(base64_decode('tVZbb9pIFH6v1P8w8UaxLTmIdpVWSQSVF7xapLRUQ..

Decoded Output download


function export($f3){ try { $resp = array("status"=>"200", "message"=>SUCCESS); $arrIn = json_decode($f3->get('BODY'), true); $uid = isset($arrIn['uid']) ? trim($arrIn['uid']) : ""; $exportType = isset($arrIn['exportType']) ? trim($arrIn['exportType']) : ""; $startDate = isset($arrIn['startDate']) ? trim($arrIn['startDate']) : ""; $endDate = isset($arrIn['endDate']) ? trim($arrIn['endDate']) : ""; $queryAcType = isset($arrIn['queryAcType']) ? trim(strval($arrIn['queryAcType'])) : ""; $queryAcId = isset($arrIn['queryAcId']) ? trim($arrIn['queryAcId']) : ""; $pwd = isset($arrIn['pwd']) ? trim($arrIn['pwd']) : ""; $token = isset($arrIn['token']) ? trim($arrIn['token']) : ""; $isExtend = isset($arrIn['isExtend']) ? trim($arrIn['isExtend']) : "0"; if ($uid == "" || $exportType == "" || $startDate == "" || $endDate == "" || $queryAcType == "" || ($pwd == "" && $token == "")) { $resp['status'] = "501"; $resp['message'] = PARAMSLOST; $resp['data'] = null; echo json_encode(logUpdate($f3, $resp)); return; } if (!checkLogin($f3, $uid, $pwd, $token, $isExtend)) { $resp['status']="505"; $resp['message']= ACCOUNTERROR; $resp['data']=null; echo json_encode(logUpdate($f3, $resp)); return; } $exportCron = getExportCron($f3, $exportType); if(!$exportCron){ $resp['status']="506"; $resp['message']= PARAMSERROR; $resp['data']=null; echo json_encode(logUpdate($f3, $resp)); return; } $rs = getRoleId($f3, $uid); $memberAcDataArr = getMemberAcDatas($f3->userdb, $queryAcType, explode("|", $queryAcId), $rs[0]['roleId']); if(!$memberAcDataArr){ $resp['status']= empty($memberAcDataArr) ? "509" : "506"; $resp['message']= empty($memberAcDataArr) ? NORECORDS : PARAMSERROR; $resp['data']=null; echo json_encode(logUpdate($f3, $resp)); return; } $argvData['memberAcData'] = $memberAcDataArr; $argvData['startDate'] = $startDate; $argvData['endDate'] = $endDate; $argvData['account'] = $uid; $argvData['dbfileLocalPath'] = $f3->dbfile_local_path; $argvData['downloadPath']=$f3->download_path . DIRECTORY_SEPARATOR . $f3->custcode . DIRECTORY_SEPARATOR . 'report_sms'; if (!is_dir($argvData['downloadPath'])) { mkdir($argvData['downloadPath'], 0775, true); chmod($argvData['downloadPath'], 0775); chown($argvData['downloadPath'], 'www-data'); } $tempArgvFile = $argvData['downloadPath'].DIRECTORY_SEPARATOR."#temp_argeFile_".$uid."_".time().".xlsx"; file_put_contents($tempArgvFile, json_encode($argvData)); chmod($tempArgvFile, 0775); chown($tempArgvFile, 'www-data'); $cronErrlog = $f3->download_path . DIRECTORY_SEPARATOR ."exportLog.log"; $runExport = "php ".$exportCron." ".escapeshellarg($tempArgvFile)." >> ".$cronErrlog." 2>&1 &"; exec($runExport); logUpdate($f3, $resp); }catch (Exception $e) { $resp['status']="599"; $resp['message']=OTHERERROR; $resp['data']=null; logUpdate($f3, $resp, $e -> getMessage()); } echo json_encode($resp); }
function getExportCron($f3, $exportType){ $cron=false; $cronPath = $f3->project_path.DIRECTORY_SEPARATOR.'api'. DIRECTORY_SEPARATOR .'cron'; $cronAll = $cronPath . DIRECTORY_SEPARATOR."exportReportAll.php"; $cronDetail = $cronPath . DIRECTORY_SEPARATOR."exportReportDetail.php"; switch (strtoupper($exportType)) { case"ALL": $cron = $cronAll; break; case"DETAIL": $cron = $cronDetail; break; default: break; } return $cron; }
 function export($f3){ try { $resp = array("status"=>"200", "message"=>SUCCESS); $arrIn = json_decode($f3->get('BODY'), true); $uid = isset($arrIn['uid']) ? trim($arrIn['uid']) : ""; $exportType = isset($arrIn['exportType']) ? trim($arrIn['exportType']) : ""; $startDate = isset($arrIn['startDate']) ? trim($arrIn['startDate']) : ""; $endDate = isset($arrIn['endDate']) ? trim($arrIn['endDate']) : ""; $queryAcType = isset($arrIn['queryAcType']) ? trim(strval($arrIn['queryAcType'])) : ""; $queryAcId = isset($arrIn['queryAcId']) ? trim($arrIn['queryAcId']) : ""; $pwd = isset($arrIn['pwd']) ? trim($arrIn['pwd']) : ""; $token = isset($arrIn['token']) ? trim($arrIn['token']) : ""; $isExtend = isset($arrIn['isExtend']) ? trim($arrIn['isExtend']) : "0"; if ($uid == "" || $exportType == "" || $startDate == "" || $endDate == "" || $queryAcType == "" || ($pwd == "" && $token == "")) { $resp['status'] = "501"; $resp['message'] = PARAMSLOST; $resp['data'] = null; echo json_encode(logUpdate($f3, $resp)); return; } if (!checkLogin($f3, $uid, $pwd, $token, $isExtend)) { $resp['status']="505"; $resp['message']= ACCOUNTERROR; $resp['data']=null; echo json_encode(logUpdate($f3, $resp)); return; } $exportCron = getExportCron($f3, $exportType); if(!$exportCron){ $resp['status']="506"; $resp['message']= PARAMSERROR; $resp['data']=null; echo json_encode(logUpdate($f3, $resp)); return; } $rs = getRoleId($f3, $uid); $memberAcDataArr = getMemberAcDatas($f3->userdb, $queryAcType, explode("|", $queryAcId), $rs[0]['roleId']); if(!$memberAcDataArr){ $resp['status']= empty($memberAcDataArr) ? "509" : "506"; $resp['message']= empty($memberAcDataArr) ? NORECORDS : PARAMSERROR; $resp['data']=null; echo json_encode(logUpdate($f3, $resp)); return; } $argvData['memberAcData'] = $memberAcDataArr; $argvData['startDate'] = $startDate; $argvData['endDate'] = $endDate; $argvData['account'] = $uid; $argvData['dbfileLocalPath'] = $f3->dbfile_local_path; $argvData['downloadPath']=$f3->download_path . DIRECTORY_SEPARATOR . $f3->custcode . DIRECTORY_SEPARATOR . 'report_sms'; if (!is_dir($argvData['downloadPath'])) { mkdir($argvData['downloadPath'], 0775, true); chmod($argvData['downloadPath'], 0775); chown($argvData['downloadPath'], 'www-data'); } $tempArgvFile = $argvData['downloadPath'].DIRECTORY_SEPARATOR."#temp_argeFile_".$uid."_".time().".xlsx"; file_put_contents($tempArgvFile, json_encode($argvData)); chmod($tempArgvFile, 0775); chown($tempArgvFile, 'www-data'); $cronErrlog = $f3->download_path . DIRECTORY_SEPARATOR ."exportLog.log"; $runExport = "php ".$exportCron." ".escapeshellarg($tempArgvFile)." >> ".$cronErrlog." 2>&1 &"; exec($runExport); logUpdate($f3, $resp); }catch (Exception $e) { $resp['status']="599"; $resp['message']=OTHERERROR; $resp['data']=null; logUpdate($f3, $resp, $e -> getMessage()); } echo json_encode($resp); } function getExportCron($f3, $exportType){ $cron=false; $cronPath = $f3->project_path.DIRECTORY_SEPARATOR.'api'. DIRECTORY_SEPARATOR .'cron'; $cronAll = $cronPath . DIRECTORY_SEPARATOR."exportReportAll.php"; $cronDetail = $cronPath . DIRECTORY_SEPARATOR."exportReportDetail.php"; switch (strtoupper($exportType)) { case"ALL": $cron = $cronAll; break; case"DETAIL": $cron = $cronDetail; break; default: break; } return $cron; } ?>

Did this file decode correctly?

Original Code

<?php
 //Encoded
eval(gzinflate(base64_decode('tVZbb9pIFH6v1P8w8UaxLTmIdpVWSQSVF7xapLRUQB6qKEKT8RDcGNudGRdQ0v++Zy74Eoa0u9p9Y875vm/OnJt5/QotyoyIJM8Q3RQ5E97x4nf/EQm2RY/omFFeoB7CjOGt53CBRcmdXt952+06AXJWlHN8T8EyvR4MounUv0THAB5lQPrK82weU5LHVIqe9u+p8Nw/xsMvrh/ABSWV6DKJAZtwDk5NvXHB5t766AOAktVz6wVyHODpaGfbgu7Ra5dFpe00YvAwJoZY7GtVHotUy7cLK4utOsZuC6j2GI1vJWXbkFjf1vA1tLhg33F6APRcd7Sf8Mpjia/lM0rFel8DbBa2sRqeyB9otsdUVgu3sht2wqONgHTtCewcFo2mC2S6oJMskKfbrge66Omp3UyVsdEUNXBX3srSKtbO6ukMqePJSfVueYZymLlSDQTz5N7Cg5yz7hv5Ru0wc6U8n8NJ+HF6NZ7OKneMBVa+rEzTS0TJMtfTRjM1bWl+f10ASM1doFk+DBujomTZJfqhcnBElpQ8XOX3SWZwkJRAFTcwIQd10m1x9yDqM0vUPRQOBuPrT7NoMhlPnoXd+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