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 header("\x45\170\160\151\x72\145\x73\x3a\40\115\157\156\54\x20\x32\x30\x20\106\x65..

Decoded Output download

<?php 
 header("Expires: Mon, 20 Feb 1989 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Content-Type: text/html;charset=utf-8"); header("Connection: close"); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; goto eBCw0; t9C93: $bufcoleta = implode("#", $arrC); goto AkVkX; g029Z: $now = strtotime($arrRelat[9] . " hours", $utc); goto bl2Kt; JmIV9: function getIP() { global $lu, $nDev, $arrIPTable; if ($lu[23] > 0) { return $lu[27] . "." . $lu[26] . "." . $lu[25] . "." . $lu[24]; } return $arrIPTable[$nDev]; } goto ms0pQ; pGxZP: $arr = explode("&", file_get_contents($base . "/editor/TABELAS/parametros")); goto gYQCw; qU9f6: if (!is_file($base . "/editor/TABELAS/ctrl_autocol")) { $controle = "0," . $tsDIA . "#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0"; $fp = fopen($base . "/editor/TABELAS/ctrl_autocol", "w"); if (fwrite($fp, $controle) === FALSE) { fclose($fp); addlog("[Stop 3] ctrl_autocol : Erro na inicializa\xc3\247\303\xa3o!", 0, 1); die(0); } fclose($fp); fun_chmod($base . "/editor/TABELAS/ctrl_autocol"); addlog('', 1, 0); } else { $controle = file_get_contents($base . "/editor/TABELAS/ctrl_autocol"); } goto X0yhh; P6b9v: $temp = explode(",", $arrC[0]); goto k7I83; niYDe: $arrC[0] = $flagFIM . "," . $tsDIA; goto t9C93; Hu2HW: function sendPDFTelegram($chatId, $patch, $token) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.telegram.org/bot" . $token . "/sendDocument?chat_id=" . $chatId); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); $finfo = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $patch); $cFile = new CURLFile($patch, $finfo); curl_setopt($ch, CURLOPT_POSTFIELDS, array("document" => $cFile)); $result = curl_exec($ch); curl_close($ch); $pos = strpos($result, "true"); if ($pos === false) { return 0; } return 1; } goto P0OTa; d80PJ: $colErro1 = 0; goto faARR; LZD5F: if (!is_file($base . "/editor/TABELAS/parm_autocol")) { addlog("[Stop 1] parm_autocol : N\303\243o localizado! ", 0, 1); die(0); } goto bX0gT; uVjor: if ($AC_MODE > 0) { $modo = "[HTTP]&"; } else { $modo = "[UDP]&"; } goto n8F_B; NxRs1: function sendMsgTelegram($chatId, $msg, $token) { $req = array("chat_id" => $chatId, "text" => $msg, "parse_mode" => "HTML"); $request = json_encode($req); $header = array("Accept: */*", "User-Agent: WEBCOLD/ESP01", "accept-encoding: gzip,deflate", "content-type: application/json; charset=utf-8", "content-length: " . strlen($request)); $ch = curl_init("https://api.telegram.org/bot" . $token . "/sendmessage"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); curl_close($ch); $pos = strpos($result, "true"); if ($pos === false) { return 0; } return 1; } goto Hu2HW; zHuhv: $utc_str = gmdate("M d Y H:i:s", time()); goto lfmyU; AkVkX: $fp = fopen($base . "/editor/TABELAS/ctrl_autocol", "w"); goto GHQUH; n8F_B: addlog($modo . $listVarr . "ENDF", 0, 0); goto WGezO; R1aQj: $colIncompleta = 0; goto CZZ_v; eaJnJ: if ($tsDIA != $temp[1]) { addlog('', 1, 0); $controle = "0," . $tsDIA . "#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0"; $fp = fopen($base . "/editor/TABELAS/ctrl_autocol", "w"); if (fwrite($fp, $controle) === FALSE) { fclose($fp); addlog("[Stop 4] ctrl_autocol : Erro na grava\xc3\xa7\xc3\xa3o!", 0, 1); die(0); } fclose($fp); fun_chmod($base . "/editor/TABELAS/ctrl_autocol"); $arrC = explode("#", $controle); $temp = explode(",", $arrC[0]); $statusFlag = intval($temp[0]); } goto qOZAT; HrU8H: $arrIPTable = explode(",", file_get_contents($base . "/editor/TABELAS/iptable")); goto joe2S; lfmyU: $utc = strtotime($utc_str); goto g029Z; UGmX0: die(0); goto okv_X; YtC6m: if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "/editor/TABELAS/logtimer_autocol", "a"); fwrite($fp, $flagFIM . "&" . $ndevcol . "&" . $nenhumacoleta . "&" . $colIncompleta . "&" . $devErro . "&" . $colErro1 . "&" . $colErro2 . "," . $TDATA . "
"); fclose($fp); fun_chmod($base . "/editor/TABELAS/logtimer_autocol"); } goto UGmX0; CZZ_v: $devErro = 0; goto d80PJ; qA2MN: if (!is_file($base . "/editor/TABELAS/iptable")) { addlog("[Stop 7] Tabela IPTable : N\303\xa3o localizada!", 0, 1); die(0); } goto HrU8H; PQaDi: $anofile = date("Y", $now); goto MKAV0; gzFey: $min = date("i", $now); goto PQaDi; GTduo: $tsColetar = intval($arrRelat[8]); goto MUP7_; jt4tt: $lu; goto gumBI; tv1Rj: $statusFlag = $statusFlag & 7; goto YmiG7; JiBES: $flagFIM = 0; goto jt4tt; bX0gT: $arrRelat = explode(",", file_get_contents($base . "/editor/TABELAS/parm_autocol")); goto yyFQK; MYMki: if ($flagFIM != 1 && $send > 0 && $tsAtual >= $send) { $flagFIM = 1; addlog("(7) Coleta liberada com restri\303\247\xc3\xb5es pelo programa!", 0, 0); $msgT = "com restri\xc3\xa7\xc3\xb5es "; } goto uqUWw; YPsXQ: $listVarr = ''; goto OjMHO; WfiTv: $tsDIA = strval($dia + $mes * 31 + $ano * 372); goto N1g3I; NKBmJ: if ($nlen < 3) { addlog("[Stop 10] Arquivo parametros : Formato ilegal!", 0, 1); die(0); } goto DcBsr; k7I83: $statusFlag = intval($temp[0]); goto eaJnJ; P0OTa: function sendEMAIL($ENVIAR_PDF, $EMAIL1, $EMAIL2, $PATCH_PDF, $DATA_RELATORIO, $EMPRESA) { global $SERVIDOR_SMTP, $SENHA_SMTP, $TIMEZONE; $REGEX = "/^([a-zA-Z0-9\.]+@+[a-zA-Z]+(\.)+[a-zA-Z]{2,3})$/"; if (!preg_match($REGEX, $EMAIL1)) { if (!preg_match($REGEX, $EMAIL2)) { return 0; } else { $EMAIL1 = $EMAIL2; $EMAIL2 = "0"; } } else { if (!preg_match($REGEX, $EMAIL2)) { $EMAIL2 = "0"; } } date_default_timezone_set($TIMEZONE); $now = date("H:i", time()); require "vendor/autoload.php"; $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = "smtp.gmail.com"; $mail->SMTPAuth = true; $mail->Username = $SERVIDOR_SMTP; $mail->Password = $SENHA_SMTP; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->Port = 465; $mail->setFrom($SERVIDOR_SMTP, "WebIce Control"); $mail->addAddress($EMAIL1, "Cliente"); if (strlen($EMAIL2) > 2) { $mail->addAddress($EMAIL2); } if ($ENVIAR_PDF > 0) { $mail->addAttachment($PATCH_PDF, $DATA_RELATORIO . ".pdf"); } $mail->isHTML(true); $mail->CharSet = "utf-8"; $mail->setLanguage = "br"; if ($ENVIAR_PDF > 0) { $mail->Subject = "Relat\xc3\263rio Fiscal de " . $DATA_RELATORIO . " [" . $now . "]"; $mail->Body = "<html><body><div style='margin:0 5%;padding:10px 0px 30px 0px;background-color:#fffde7;text-align: center;border-radius: 7px;'><div style='font-size:14px;'>" . $EMPRESA . "</div><h3 style='color:#ff2877;'><b>Chegou um<br>Relat\xc3\xb3rio Fiscal!</b></h3><div style='font-size:14px;color:#007'>Para abrir, clique no arquivo em anexo.</b></div><br><span style='font-size:12px;color:#555;'><i><b>Obrigado por utilizar nosso programa!</b></i></span></div></body></html>"; } else { $mail->Subject = "Autentica\303\247\303\243o de Email - WebIce [" . $now . "]"; $mail->Body = "<html><body><div style='margin:0 5%;padding:10px 0px 30px 0px;background-color:#fffde7;text-align: center;border-radius: 7px;'><h4 style='color:#ff2877;'><b>Parab\xc3\xa9ns, este E-mail<br>est\xc3\xa1 apto a receber relat\303\263rios do<br>Sistema de Monitoramento Webice!</b></h3><div style='font-size:12px;color:#555;'><i><b><br>Obrigado por utilizar nosso programa!</b></i></div></body></html>"; } $mail->send(); return 1; } catch (Exception $e) { $msgerr = $mail->ErrorInfo; } return 0; } goto d93ot; CjPnb: function isGroupTelegram($val) { if (strlen($val) < 7) { return 0; } if ($val > 0) { return 0; } return preg_match("~^((?:\+|-)?[0-9]+)$~", $val); } goto yPOY5; YmiG7: if ($statusFlag == 7) { $fp = fopen($base . "/editor/TABELAS/timer_autocol", "w"); fwrite($fp, "7&0&0&0&0&0&0," . $now . "," . $TDATA); fclose($fp); fun_chmod($base . "/editor/TABELAS/timer_autocol"); if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "/editor/TABELAS/logtimer_autocol", "a"); fwrite($fp, "7&0&0&0&0&0&0," . $TDATA . "\xa"); fclose($fp); fun_chmod($base . "/editor/TABELAS/logtimer_autocol"); } die(0); } goto tATAr; wr0KU: $fp = fopen($base . "/editor/TABELAS/timer_autocol", "w"); goto QHYHG; gumBI: $nDev; goto mXNGB; gYQCw: $nlen = sizeof($arr); goto NKBmJ; vL1b0: fun_chmod($base . "/editor/TABELAS/ctrl_autocol"); goto wr0KU; yyFQK: if ($arrRelat[11] < 1) { addlog("[Stop 2] Coleta desabilitada!", 0, 1); die(0); } goto GTduo; bl2Kt: $dia = intval(date("d", $now)); goto a_3so; NFegh: $TDATA = $hor . ":" . $min . " / " . $dia . "-" . $mesAbrv[$mes] . "-" . ($ano + $ANOBASE); goto h40Ry; DcBsr: if ($AC_MODE > 0) { autocoletaHTTP(); $mode = "HTTP"; } else { autocoletaUDP(); $mode = "UDP"; } goto uVjor; iixfc: $ndevcol = 0; goto F14i0; tATAr: if ($statusFlag & 1) { if (!is_file($base . "/editor/TABELAS/setup")) { addlog("[Stop 5] Arquivo setup : N\303\243o localizado!", 0, 1); die(0); } $arrsetup = explode(",", file_get_contents($base . "/editor/TABELAS/setup")); $urlPDF = $base . "/RELATORIO/PDF/" . $anofile . "/" . $mesfile . "/" . $dia . "-" . $mes . "-" . $anofile . ".pdf"; if (~$statusFlag & 2 && $arrsetup[6] > 0 && isGroupTelegram($arrRelat[5]) > 0) { if ($arrsetup[6] > 1) { if (sendPDFTelegram($arrRelat[5], $urlPDF, $TOKEN) > 0) { addlog("(1) Relat\303\263rio fiscal enviado com sucesso ao grupo Telegram! (2x)", 0, 0); $flagFIM = 7; } else { addlog("(2) Relat\303\xb3rio fiscal n\xc3\xa3o enviado ao grupo Telegram! (2x)", 0, 0); } } else { if (sendMsgTelegram($arrRelat[5], $AC_TELEGRAM_1 . $AC_TELEGRAM_2, $TOKEN) > 0) { addlog("(3) Relat\303\xb3rio Fiscal => Notifica\xc3\xa7\303\xa3o enviada com sucesso ao grupo Telegram! (2x)", 0, 0); } else { addlog("(4) Relat\303\263rio Fiscal => Notifica\303\247\xc3\243o n\xc3\243o enviada ao grupo Telegram! (2x)", 0, 0); } $flagFIM = $flagFIM | 2; } } $REGEX = "/^([a-zA-Z0-9\.]+@+[a-zA-Z]+(\.)+[a-zA-Z]{2,3})$/"; if (~$statusFlag & 4 && $HABUSODEEMAIL > 0 && $arrsetup[6] > 1 && (preg_match($REGEX, $arrRelat[2]) || preg_match($REGEX, $arrRelat[3]))) { $dtr = $dia . "-" . $mes . "-" . $anofile; if (sendEMAIL(1, $arrRelat[2], $arrRelat[3], $urlPDF, $dtr, $arrRelat[0]) > 0) { addlog("(5) Relat\xc3\263rio fiscal enviado com sucesso ao email registrado! (2x)", 0, 0); } else { addlog("(6) Relat\303\263rio n\xc3\243o enviado ao email registrado! (2x)", 0, 0); } } $arrC[0] = "7," . $temp[1]; $bufcoleta = implode("#", $arrC); $fp = fopen("editor/TABELAS/ctrl_autocol", "w"); if (fwrite($fp, $bufcoleta) === FALSE) { fclose($fp); addlog("[Stop 6] ctrl_autocol : Erro na grava\303\xa7\xc3\243o!", 0, 1); die(0); } fclose($fp); $fp = fopen($base . "/editor/TABELAS/timer_autocol", "w"); fwrite($fp, "7&0&0&0&0&0&0," . $now . "," . $TDATA); fclose($fp); fun_chmod($base . "/editor/TABELAS/timer_autocol"); if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "/editor/TABELAS/logtimer_autocol", "a"); fwrite($fp, "7&0&0&0&0&0&0," . $TDATA . "
"); fclose($fp); fun_chmod($base . "/editor/TABELAS/logtimer_autocol"); } die(0); } goto qA2MN; dWmWr: function writeColetaformatPDF() { global $arrC, $now, $bufdata, $listVarr, $TABMESFILE, $base; $coleta = array(); for ($i = 1; $i < 101; $i++) { $temp = explode("*", $arrC[$i]); if ($temp[0] == "7" || $temp[0] == "4") { array_push($coleta, $temp[1]); } } $bufdata = implode("*", $coleta) . "*" . $listVarr . "ENDF"; $dia = intval(date("d", $now)); $mes = intval(date("m", $now)); $anofile = date("Y", $now); $mesfile = $TABMESFILE[$mes]; $dirRelat = $base . "/RELATORIO/COLETA/"; if (!is_dir($dirRelat)) { mkdir($dirRelat, 511, true); } $dirRelat .= $anofile . "/"; if (!is_dir($dirRelat)) { mkdir($dirRelat, 511, true); } $dirRelat .= $mesfile . "/"; if (!is_dir($dirRelat)) { mkdir($dirRelat, 511, true); } $dirRelat .= $dia . "-" . $mes . "-" . $anofile . ".txt"; $fp = fopen($dirRelat, "w"); if (fwrite($fp, $bufdata) === FALSE) { fclose($fp); addlog("[13] - Erro durante grava\303\247\303\243o da coleta do dia", 0, 0); die(0); } fclose($fp); return; } goto JIB5G; acevc: function fun_chmod($patch) { global $PHPERR; if ($PHPERR > 0) { return; } chmod($patch, 511); return; } goto CjPnb; okv_X: function addlog($msg, $newday, $stopCron) { global $base, $HAB_LOGCP, $TDATA, $hor, $min; if ($HAB_LOGCP > 0) { if ($newday > 0) { $msg = "====================================\xaSTART COLETA => " . $TDATA . "
====================================
"; } else { $msg = $hor . ":" . $min . "&" . $msg . "\xa"; } $fp = fopen($base . "/editor/TABELAS/autocol.log", "a"); fwrite($fp, $msg); fclose($fp); fun_chmod($base . "/editor/TABELAS/autocol.log"); if ($stopCron > 0) { shell_exec("sudo systemctl stop cron"); $fp = fopen($base . "/editor/TABELAS/timer_autocol", "w"); fwrite($fp, $msg); fclose($fp); } } return; } goto acevc; h40Ry: $tsAtual = intval($hor) * 60 + intval($min); goto qU9f6; JIB5G: function reqCURL($url, $get, $comandoPOST, $outttime) { global $response, $bufdata, $AC_TIMEOUT; $curl = curl_init(); if ($get > 0) { curl_setopt_array($curl, array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 0, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => $outttime, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET")); $response = curl_exec($curl); $information = curl_getinfo($curl); curl_close($curl); return intval($information["http_code"]); } curl_setopt_array($curl, array(CURLOPT_URL => "localhost/RELATORIO/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 0, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => $outttime, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array($comandoPOST => $bufdata))); $response = curl_exec($curl); $information = curl_getinfo($curl); curl_close($curl); return intval($information["http_code"]); } goto NxRs1; F14i0: $nenhumacoleta = 0; goto R1aQj; ms0pQ: function autocoletaUDP() { global $lu, $nDev, $dia, $mes, $ano, $arrC, $nlen, $arr, $response; global $arrIPTable, $flagFIM, $nOff, $listVarr; global $AC_PORT, $AC_WTIME, $AC_REFISHTIMER; global $ndevcol, $nenhumacoleta, $colIncompleta, $devErro, $colErro1, $colErro2; $flagError = 0; $flagFIM = 1; $ndevcol = 0; $nenhumacoleta = 0; $colIncompleta = 0; $devErro = 0; $colErro1 = 0; $colErro2 = 0; $socket = socket_create(AF_INET, SOCK_DGRAM, 0); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array("sec" => 2, "usec" => 0)); for ($i = 3; $i < $nlen; $i++) { $lu = explode(",", $arr[$i]); if ($lu[0] > 0) { $ndevcol++; $nDev = intval($lu[1]); $dnsName = "wic" . strval($nDev); if ($nDev < 10) { $dnsName = "wic0" . strval($nDev); } $fluxControl = intval(substr($arrC[$nDev + 1], 0, 1)); if ($fluxControl != 7 && $fluxControl != 1 && $fluxControl != 2) { $host = getIP(); if (socket_connect($socket, $host, $AC_PORT)) { $msg = "getcoldiaudp," . $dia . "-" . $mes . "-" . $ano; socket_write($socket, $msg, strlen($msg)); $response = socket_read($socket, $AC_PORT); if (substr($response, 0, 2) == "OK") { $arrpri = explode("@", $response); $arrHead = explode(",", $arrpri[0]); if ($arrHead[0] == "OK") { if ($arrHead[1] == $dnsName) { if ($arrHead[8] > 0) { if ($arrHead[7] == $arrHead[8]) { $listVarr .= $nDev . ":7,"; $arrC[$nDev + 1] = "7*" . $response; } else { $arrC[$nDev + 1] = "4*" . $response; $listVarr .= $nDev . ":4,"; $flagFIM = 0; $colIncompleta++; } } else { $arrC[$nDev + 1] = "3*" . $response; $listVarr .= $nDev . ":3,"; $flagFIM = 0; $nenhumacoleta++; } } else { $colErro2++; $arrC[$nDev + 1] = "2*FE_DNSNAME"; $listVarr .= $nDev . ":2,"; addlog("(15) UDP FE_DNSNAME " . $dnsName . ": " . substr($response, 0, 100), 0, 0); } } else { $colErro1++; $arrC[$nDev + 1] = "1*FE_FORMAT"; $listVarr .= $nDev . ":1,"; addlog("(16) UDP FE_FORMAT " . $dnsName . ": " . substr($response, 0, 100), 0, 0); } } else { $devErro++; $flagError = 1; $arrC[$nDev + 1] = "5*" . $response; $listVarr .= $nDev . ":5,"; $flagFIM = 0; } } else { $listVarr .= $nDev . ":ECX,"; } } else { if ($fluxControl == 7) { $listVarr .= $nDev . ":7,"; } else { $listVarr .= $nDev . ":" . $fluxControl . ","; } } } else { $nDev = intval($lu[1]); $listVarr .= $nDev . ":0,"; } } socket_close($socket); return $flagError; } goto xWdA5; mXNGB: $bufdata; goto iixfc; WGezO: $msgT = "com sucesso "; goto MYMki; PWKeh: fclose($fp); goto SAJjx; GHQUH: if (fwrite($fp, $bufcoleta) === FALSE) { fclose($fp); addlog("[Stop 13] Erro na grava\xc3\247\303\243o de ctrl_autocol!", 0, 1); die(0); } goto onQdN; SAJjx: fun_chmod($base . "/editor/TABELAS/timer_autocol"); goto YtC6m; X0yhh: $arrC = explode("#", $controle); goto P6b9v; yPOY5: function isIPV4($ip) { return preg_match("/^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/", $ip); } goto JmIV9; onQdN: fclose($fp); goto vL1b0; qOZAT: if ($tsAtual < $tsColetar) { $fp = fopen($base . "/editor/TABELAS/timer_autocol", "w"); fwrite($fp, "0&0&0&0&0&0&0," . $now . "," . $TDATA); fclose($fp); fun_chmod($base . "/editor/TABELAS/timer_autocol"); if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "/editor/TABELAS/logtimer_autocol", "a"); fwrite($fp, "0&0&0&0&0&0&0," . $TDATA . "\xa"); fclose($fp); fun_chmod($base . "/editor/TABELAS/logtimer_autocol"); } die(0); } goto tv1Rj; uqUWw: if ($flagFIM == 1) { writeColetaformatPDF(); $bufdata = "1,1," . $dia . "-" . $mes . "-" . $anofile . "*" . $bufdata; reqCURL($base . "/RELATORIO/", 0, "writecoleta", $AC_TIMEOUT); if ($response == "WRITECOLETAOK") { addlog("(8) Relat\303\263rio Fiscal gerado com sucesso!", 0, 0); } else { addlog("[Stop 11] Erro na grava\xc3\xa7\303\xa3o do Relat\303\xb3rio Fiscal (PDF)!", 0, 1); die(0); } if (!is_file($base . "/editor/TABELAS/setup")) { addlog("[Stop 12] Arquivo setup : N\303\xa3o localizado!", 0, 1); die(0); } $arrsetup = explode(",", file_get_contents($base . "/editor/TABELAS/setup")); $urlPDF = $base . "/RELATORIO/PDF/" . $anofile . "/" . $mesfile . "/" . $dia . "-" . $mes . "-" . $anofile . ".pdf"; if ($arrsetup[6] > 0 && isGroupTelegram($arrRelat[5]) > 0 && strlen($arrRelat[4]) > 5) { if ($arrsetup[6] > 1) { if (sendPDFTelegram($arrRelat[5], $urlPDF, $TOKEN) > 0) { addlog("(9) Relat\303\xb3rio fiscal enviado com sucesso ao grupo Telegram! (1x)", 0, 0); $flagFIM = $flagFIM | 2; } else { addlog("(10) Relat\xc3\263rio fiscal n\xc3\xa3o enviado ao grupo Telegram! (1x)", 0, 0); } } else { if (sendMsgTelegram($arrRelat[5], $AC_TELEGRAM_1 . $msgT . $AC_TELEGRAM_2, $TOKEN) > 0) { addlog("(11) Relat\xc3\263rio Fiscal => Notifica\303\xa7\xc3\xa3o enviada com sucesso ao grupo Telegram! (1x)", 0, 0); $flagFIM = $flagFIM | 2; } else { addlog("(12) Relat\xc3\xb3rio Fiscal => Notifica\303\xa7\303\243o n\xc3\xa3o enviada ao grupo Telegram! (1x)", 0, 0); } } } else { $flagFIM = $flagFIM | 2; } $REGEX = "/^([a-zA-Z0-9\.]+@+[a-zA-Z]+(\.)+[a-zA-Z]{2,3})$/"; if ($HABUSODEEMAIL > 0 && $arrsetup[6] > 1 && (preg_match($REGEX, $arrRelat[2]) || preg_match($REGEX, $arrRelat[3]))) { $dtr = $dia . "-" . $mes . "-" . $anofile; if (sendEMAIL(1, $arrRelat[2], $arrRelat[3], $urlPDF, $dtr, $arrRelat[0]) > 0) { addlog("(13) Relat\xc3\263rio fiscal enviado com sucesso ao email registrado! (1x)", 0, 0); $flagFIM = $flagFIM | 4; } else { addlog("(14) Relat\xc3\xb3rio n\xc3\243o enviado ao email registrado! (1x)", 0, 0); } $statusFlag = $statusFlag | 4; } else { $flagFIM = $flagFIM | 4; } } goto niYDe; N1g3I: $hor = date("H", $now); goto gzFey; eBCw0: include "constantes.php"; goto Oh3VF; tpmXF: $ano = intval(date("y", $now)); goto WfiTv; MUP7_: if (preg_match("/[0-2][0-9]:[0-5][0-9]/", $ENVIO_OBRIGATORIO) > 0) { $sendH = substr($ENVIO_OBRIGATORIO, 0, 2); $sendM = substr($ENVIO_OBRIGATORIO, 3); $send = intval($sendH) * 60 + intval($sendM); } else { $send = 0; } goto xfVGk; OjMHO: if (!is_file($base . "/editor/TABELAS/parametros")) { addlog("[Stop 9] Arquivo parametros : N\xc3\243o localizado! ", 0, 1); die(0); } goto pGxZP; xWdA5: function autocoletaHTTP() { global $lu, $nDev, $dia, $mes, $ano, $arrC, $nlen, $arr, $response; global $arrIPTable, $flagFIM, $nOff, $listVarr, $PASSOCA, $AC_TIMEOUT; global $ndevcol, $nenhumacoleta, $colIncompleta, $devErro, $colErro1, $colErro2; $flagError = 0; $flagFIM = 1; $ndevcol = 0; $nenhumacoleta = 0; $colIncompleta = 0; $devErro = 0; $colErro1 = 0; $colErro2 = 0; for ($i = 3; $i < $nlen; $i++) { $lu = explode(",", $arr[$i]); if ($lu[0] > 0) { $ndevcol++; $nDev = intval($lu[1]); $dnsName = "wic" . strval($nDev); if ($nDev < 10) { $dnsName = "wic0" . strval($nDev); } $fluxControl = intval(substr($arrC[$nDev + 1], 0, 1)); if ($fluxControl != 7 && $fluxControl != 1 && $fluxControl != 2) { $url = "http://" . getIP() . "/getcoldia?wkey=" . $dia . "-" . $mes . "-" . $ano . "&pass=" . base64_decode($PASSOCA[1]); $respHTTP = reqCURL($url, 1, "null", $AC_TIMEOUT); if ($respHTTP == 200) { $arrpri = explode("@", $response); $arrHead = explode(",", $arrpri[0]); if ($arrHead[0] == "OK") { if ($arrHead[1] == $dnsName) { if ($arrHead[8] > 0) { if ($arrHead[7] == $arrHead[8]) { $listVarr .= $nDev . ":7,"; $arrC[$nDev + 1] = "7*" . $response; } else { $arrC[$nDev + 1] = "4*" . $response; $listVarr .= $nDev . ":4,"; $flagFIM = 0; $colIncompleta++; } } else { $arrC[$nDev + 1] = "3*" . $response; $listVarr .= $nDev . ":3,"; $flagFIM = 0; $nenhumacoleta++; } } else { $colErro2++; $arrC[$nDev + 1] = "2*FE_DNSNAME"; $listVarr .= $nDev . ":2,"; addlog("(17) HTTP FE_DNSNAME " . $dnsName . ": " . substr($response, 0, 100), 0, 0); } } else { $colErro1++; $arrC[$nDev + 1] = "1*FE_FORMAT"; $listVarr .= $nDev . ":1,"; addlog("(18) HTTP FE_FORMAT " . $dnsName . ": " . substr($response, 0, 100), 0, 0); } } else { $devErro++; $flagError = 1; $arrC[$nDev + 1] = "5*" . $respHTTP; $listVarr .= $nDev . ":5,"; $flagFIM = 0; } } else { if ($fluxControl == 7) { $listVarr .= $nDev . ":7,"; } else { $listVarr .= $nDev . ":" . $fluxControl . ","; } } } else { $nDev = intval($lu[1]); $listVarr .= $nDev . ":0,"; } } return $flagError; } goto dWmWr; a_3so: $mes = intval(date("m", $now)); goto tpmXF; xfVGk: date_default_timezone_set($TIMEZONE); goto zHuhv; joe2S: if (sizeof($arrIPTable) != 102) { addlog("[Stop 8] Tabela IPTable : Formato ilegal!", 0, 1); die(0); } goto YPsXQ; Oh3VF: $response = ''; goto JiBES; faARR: $colErro2 = 0; goto LZD5F; QHYHG: fwrite($fp, $flagFIM . "&" . $ndevcol . "&" . $nenhumacoleta . "&" . $colIncompleta . "&" . $devErro . "&" . $colErro1 . "&" . $colErro2 . "," . $now . "," . $TDATA); goto PWKeh; MKAV0: $mesfile = $TABMESFILE[$mes]; goto NFegh; d93ot: ?>

Did this file decode correctly?

Original Code

<?php
 header("\x45\170\160\151\x72\145\x73\x3a\40\115\157\156\54\x20\x32\x30\x20\106\x65\142\40\x31\71\x38\x39\x20\x30\x35\72\x30\60\72\60\x30\x20\107\x4d\x54"); header("\103\141\x63\150\145\x2d\103\x6f\x6e\164\x72\157\x6c\x3a\40\156\x6f\x2d\x73\x74\x6f\162\145\54\40\156\157\x2d\x63\141\x63\x68\x65\54\40\155\x75\163\x74\55\162\x65\x76\141\154\x69\x64\x61\164\145"); header("\x43\x61\143\150\x65\55\103\157\x6e\164\x72\x6f\x6c\x3a\40\x70\x6f\163\164\55\143\150\x65\x63\153\x3d\x30\x2c\x20\x70\162\x65\x2d\x63\x68\x65\143\x6b\75\60", false); header("\x50\x72\141\147\155\x61\72\x20\x6e\157\55\x63\141\x63\x68\x65"); header("\103\157\156\x74\145\x6e\164\x2d\x54\x79\160\145\x3a\x20\x74\x65\x78\164\x2f\150\x74\155\x6c\x3b\143\x68\x61\162\163\x65\x74\x3d\165\x74\146\55\x38"); header("\x43\157\156\x6e\x65\x63\164\151\x6f\156\72\40\143\x6c\157\163\145"); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; goto eBCw0; t9C93: $bufcoleta = implode("\43", $arrC); goto AkVkX; g029Z: $now = strtotime($arrRelat[9] . "\x20\150\x6f\165\162\163", $utc); goto bl2Kt; JmIV9: function getIP() { global $lu, $nDev, $arrIPTable; if ($lu[23] > 0) { return $lu[27] . "\56" . $lu[26] . "\x2e" . $lu[25] . "\x2e" . $lu[24]; } return $arrIPTable[$nDev]; } goto ms0pQ; pGxZP: $arr = explode("\x26", file_get_contents($base . "\57\145\144\x69\164\157\162\x2f\124\101\102\x45\x4c\x41\123\x2f\160\141\162\141\x6d\x65\x74\162\x6f\x73")); goto gYQCw; qU9f6: if (!is_file($base . "\x2f\145\x64\151\164\x6f\162\x2f\124\x41\102\x45\114\101\x53\57\143\x74\x72\154\x5f\x61\165\x74\157\x63\157\x6c")) { $controle = "\60\x2c" . $tsDIA . "\x23\x30\43\60\43\60\43\x30\43\x30\x23\60\x23\x30\x23\60\x23\x30\43\x30\x23\x30\43\x30\x23\60\x23\60\x23\60\x23\60\x23\x30\43\x30\x23\x30\x23\60\x23\60\x23\60\x23\60\x23\60\43\60\x23\x30\x23\60\43\60\x23\x30\43\x30\x23\60\43\60\43\60\x23\60\43\x30\43\x30\43\x30\43\x30\x23\60\43\x30\x23\x30\43\x30\x23\60\x23\60\x23\x30\x23\x30\x23\x30\43\60\x23\60\x23\60\x23\x30\x23\x30\43\x30\x23\60\x23\60\43\x30\43\60\x23\x30\x23\60\43\x30\43\60\43\60\x23\x30\43\x30\43\x30\43\x30\x23\60\43\x30\x23\x30\43\60\43\x30\43\x30\x23\x30\x23\x30\43\60\x23\60\43\60\43\x30\43\60\x23\x30\x23\60\x23\x30\x23\60\x23\x30\x23\x30\x23\x30\43\60\x23\x30\43\60\43\60\43\60\x23\x30\43\60\x23\x30\43\x30\x23\60\43\60\x23\60\43\x30\x23\60"; $fp = fopen($base . "\57\145\x64\x69\x74\157\x72\57\x54\101\x42\105\114\101\x53\x2f\143\x74\x72\x6c\137\x61\x75\x74\157\x63\x6f\154", "\167"); if (fwrite($fp, $controle) === FALSE) { fclose($fp); addlog("\x5b\x53\164\x6f\x70\40\63\x5d\x20\x63\x74\162\x6c\x5f\x61\165\x74\157\x63\157\154\x20\x3a\x20\105\162\162\x6f\40\156\x61\x20\151\156\x69\x63\151\x61\x6c\151\172\x61\xc3\247\303\xa3\157\41", 0, 1); die(0); } fclose($fp); fun_chmod($base . "\57\145\144\151\164\x6f\162\57\x54\101\102\105\x4c\101\123\57\x63\164\x72\x6c\137\141\165\x74\x6f\143\157\154"); addlog('', 1, 0); } else { $controle = file_get_contents($base . "\57\145\144\151\164\157\162\x2f\124\101\x42\x45\114\101\x53\x2f\143\164\162\154\137\141\x75\164\157\143\157\154"); } goto X0yhh; P6b9v: $temp = explode("\x2c", $arrC[0]); goto k7I83; niYDe: $arrC[0] = $flagFIM . "\54" . $tsDIA; goto t9C93; Hu2HW: function sendPDFTelegram($chatId, $patch, $token) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "\150\164\x74\x70\x73\72\57\x2f\x61\x70\151\x2e\164\145\x6c\x65\x67\162\x61\x6d\x2e\157\x72\x67\x2f\142\x6f\x74" . $token . "\x2f\163\145\x6e\x64\104\x6f\143\x75\155\145\x6e\164\x3f\143\x68\x61\164\137\151\x64\75" . $chatId); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); $finfo = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $patch); $cFile = new CURLFile($patch, $finfo); curl_setopt($ch, CURLOPT_POSTFIELDS, array("\144\x6f\143\165\155\x65\x6e\164" => $cFile)); $result = curl_exec($ch); curl_close($ch); $pos = strpos($result, "\164\x72\165\x65"); if ($pos === false) { return 0; } return 1; } goto P0OTa; d80PJ: $colErro1 = 0; goto faARR; LZD5F: if (!is_file($base . "\57\x65\x64\x69\x74\157\162\57\124\101\102\105\x4c\101\x53\x2f\160\141\x72\155\137\x61\165\x74\157\143\x6f\154")) { addlog("\133\x53\164\157\160\40\61\135\x20\160\141\162\155\x5f\141\x75\164\157\143\157\x6c\40\72\x20\116\303\243\x6f\x20\154\x6f\143\141\154\151\172\141\x64\x6f\41\40", 0, 1); die(0); } goto bX0gT; uVjor: if ($AC_MODE > 0) { $modo = "\x5b\110\x54\124\120\135\x26"; } else { $modo = "\133\125\104\120\x5d\x26"; } goto n8F_B; NxRs1: function sendMsgTelegram($chatId, $msg, $token) { $req = array("\x63\x68\141\164\137\x69\x64" => $chatId, "\x74\x65\170\164" => $msg, "\160\141\x72\163\x65\x5f\x6d\x6f\144\x65" => "\110\x54\115\114"); $request = json_encode($req); $header = array("\x41\143\143\x65\x70\164\72\x20\x2a\57\52", "\125\163\x65\x72\55\x41\147\145\156\164\x3a\40\x57\x45\102\103\117\x4c\x44\57\x45\x53\120\60\61", "\x61\143\x63\145\x70\164\x2d\145\156\143\157\144\151\x6e\147\x3a\x20\x67\172\151\x70\x2c\144\145\146\x6c\x61\164\x65", "\x63\x6f\x6e\164\x65\156\164\x2d\164\x79\160\145\x3a\x20\141\160\x70\x6c\151\143\141\164\151\x6f\156\57\x6a\x73\157\x6e\x3b\x20\143\150\x61\162\x73\x65\164\x3d\165\x74\x66\x2d\70", "\x63\157\156\164\145\156\x74\55\154\x65\156\147\x74\x68\72\x20" . strlen($request)); $ch = curl_init("\150\x74\164\x70\x73\72\x2f\57\141\x70\x69\56\x74\x65\x6c\145\147\x72\x61\x6d\x2e\157\x72\147\x2f\x62\157\164" . $token . "\x2f\163\x65\x6e\x64\x6d\x65\163\x73\x61\147\145"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); curl_close($ch); $pos = strpos($result, "\x74\162\165\145"); if ($pos === false) { return 0; } return 1; } goto Hu2HW; zHuhv: $utc_str = gmdate("\115\x20\144\x20\x59\40\x48\x3a\x69\x3a\x73", time()); goto lfmyU; AkVkX: $fp = fopen($base . "\x2f\x65\144\x69\x74\x6f\162\x2f\x54\101\102\105\x4c\x41\x53\x2f\x63\164\162\154\137\x61\x75\x74\x6f\143\x6f\154", "\x77"); goto GHQUH; n8F_B: addlog($modo . $listVarr . "\105\x4e\104\106", 0, 0); goto WGezO; R1aQj: $colIncompleta = 0; goto CZZ_v; eaJnJ: if ($tsDIA != $temp[1]) { addlog('', 1, 0); $controle = "\x30\54" . $tsDIA . "\43\60\x23\60\x23\x30\x23\x30\x23\60\43\60\43\60\x23\x30\43\x30\43\x30\x23\60\43\x30\x23\x30\x23\x30\x23\60\x23\x30\43\60\x23\60\x23\60\x23\60\x23\60\43\x30\43\x30\x23\x30\43\x30\43\60\43\60\x23\60\x23\x30\43\x30\43\x30\43\60\43\x30\43\x30\x23\x30\x23\60\x23\60\x23\60\43\x30\x23\x30\43\x30\43\60\43\x30\43\60\x23\x30\43\60\x23\60\43\60\x23\x30\x23\x30\43\60\43\x30\43\x30\43\60\43\60\x23\60\43\60\43\60\43\x30\43\x30\x23\x30\43\60\x23\60\x23\x30\x23\x30\x23\x30\43\60\43\60\43\x30\x23\x30\43\x30\43\60\x23\60\43\60\43\x30\43\60\43\x30\x23\60\43\60\43\60\43\x30\x23\x30\x23\x30\x23\x30\43\60\43\x30\43\60\x23\x30\x23\60\43\x30\x23\x30\x23\x30\43\x30\43\x30\x23\60\43\x30\x23\x30\x23\x30\x23\x30\x23\60"; $fp = fopen($base . "\x2f\x65\x64\x69\164\157\162\57\x54\101\x42\105\x4c\x41\x53\x2f\x63\164\x72\154\x5f\x61\x75\x74\x6f\x63\157\154", "\x77"); if (fwrite($fp, $controle) === FALSE) { fclose($fp); addlog("\133\x53\x74\157\160\x20\x34\x5d\40\143\164\x72\154\x5f\x61\x75\x74\157\143\x6f\154\40\72\40\x45\x72\162\x6f\40\156\x61\x20\147\x72\x61\166\x61\xc3\xa7\xc3\xa3\157\x21", 0, 1); die(0); } fclose($fp); fun_chmod($base . "\57\145\x64\x69\x74\x6f\162\57\124\x41\102\105\114\101\x53\57\143\x74\x72\x6c\x5f\x61\165\164\x6f\143\157\x6c"); $arrC = explode("\43", $controle); $temp = explode("\x2c", $arrC[0]); $statusFlag = intval($temp[0]); } goto qOZAT; HrU8H: $arrIPTable = explode("\54", file_get_contents($base . "\x2f\145\x64\151\164\x6f\162\57\124\x41\102\x45\x4c\101\x53\x2f\x69\160\164\141\142\x6c\x65")); goto joe2S; lfmyU: $utc = strtotime($utc_str); goto g029Z; UGmX0: die(0); goto okv_X; YtC6m: if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "\x2f\145\144\x69\164\157\162\x2f\x54\101\102\105\114\101\x53\57\x6c\x6f\x67\x74\151\155\145\162\x5f\x61\x75\x74\x6f\x63\157\x6c", "\x61"); fwrite($fp, $flagFIM . "\46" . $ndevcol . "\x26" . $nenhumacoleta . "\46" . $colIncompleta . "\46" . $devErro . "\x26" . $colErro1 . "\x26" . $colErro2 . "\x2c" . $TDATA . "\12"); fclose($fp); fun_chmod($base . "\x2f\145\144\x69\x74\157\x72\x2f\124\101\x42\105\x4c\101\x53\x2f\154\157\147\x74\x69\155\x65\x72\137\x61\x75\x74\157\143\x6f\x6c"); } goto UGmX0; CZZ_v: $devErro = 0; goto d80PJ; qA2MN: if (!is_file($base . "\x2f\x65\x64\x69\164\x6f\162\57\x54\101\x42\105\114\x41\x53\57\x69\160\x74\141\142\154\x65")) { addlog("\133\123\x74\x6f\160\x20\67\135\40\x54\141\x62\145\154\x61\40\111\x50\124\x61\x62\x6c\x65\x20\x3a\x20\116\303\xa3\x6f\40\154\157\x63\x61\154\151\x7a\141\x64\x61\x21", 0, 1); die(0); } goto HrU8H; PQaDi: $anofile = date("\x59", $now); goto MKAV0; gzFey: $min = date("\151", $now); goto PQaDi; GTduo: $tsColetar = intval($arrRelat[8]); goto MUP7_; jt4tt: $lu; goto gumBI; tv1Rj: $statusFlag = $statusFlag & 7; goto YmiG7; JiBES: $flagFIM = 0; goto jt4tt; bX0gT: $arrRelat = explode("\54", file_get_contents($base . "\57\145\144\x69\164\157\162\x2f\124\x41\x42\x45\x4c\101\123\x2f\160\x61\x72\155\137\x61\x75\164\157\x63\x6f\154")); goto yyFQK; MYMki: if ($flagFIM != 1 && $send > 0 && $tsAtual >= $send) { $flagFIM = 1; addlog("\x28\x37\x29\40\103\157\x6c\x65\164\141\x20\x6c\x69\142\x65\x72\141\x64\x61\x20\x63\157\x6d\x20\x72\x65\163\164\162\x69\303\247\xc3\xb5\145\x73\40\160\145\154\x6f\x20\x70\162\157\147\162\141\155\x61\41", 0, 0); $msgT = "\143\157\155\x20\x72\x65\x73\x74\162\151\xc3\xa7\xc3\xb5\x65\163\40"; } goto uqUWw; YPsXQ: $listVarr = ''; goto OjMHO; WfiTv: $tsDIA = strval($dia + $mes * 31 + $ano * 372); goto N1g3I; NKBmJ: if ($nlen < 3) { addlog("\x5b\123\x74\157\x70\40\x31\x30\x5d\x20\x41\162\161\x75\x69\166\157\40\160\x61\x72\x61\x6d\145\x74\x72\x6f\x73\40\72\x20\x46\157\x72\155\x61\x74\157\x20\x69\x6c\145\147\141\154\41", 0, 1); die(0); } goto DcBsr; k7I83: $statusFlag = intval($temp[0]); goto eaJnJ; P0OTa: function sendEMAIL($ENVIAR_PDF, $EMAIL1, $EMAIL2, $PATCH_PDF, $DATA_RELATORIO, $EMPRESA) { global $SERVIDOR_SMTP, $SENHA_SMTP, $TIMEZONE; $REGEX = "\57\x5e\x28\x5b\x61\55\x7a\x41\x2d\132\x30\55\71\x5c\x2e\135\53\x40\x2b\133\141\x2d\x7a\x41\x2d\132\x5d\53\x28\x5c\56\51\53\133\x61\55\172\101\x2d\x5a\135\x7b\62\54\63\x7d\x29\x24\57"; if (!preg_match($REGEX, $EMAIL1)) { if (!preg_match($REGEX, $EMAIL2)) { return 0; } else { $EMAIL1 = $EMAIL2; $EMAIL2 = "\x30"; } } else { if (!preg_match($REGEX, $EMAIL2)) { $EMAIL2 = "\x30"; } } date_default_timezone_set($TIMEZONE); $now = date("\110\72\151", time()); require "\x76\145\x6e\x64\157\162\x2f\141\165\x74\157\154\x6f\141\x64\56\x70\x68\160"; $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = "\163\x6d\164\x70\56\147\155\x61\x69\154\x2e\x63\157\x6d"; $mail->SMTPAuth = true; $mail->Username = $SERVIDOR_SMTP; $mail->Password = $SENHA_SMTP; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->Port = 465; $mail->setFrom($SERVIDOR_SMTP, "\127\145\x62\x49\143\145\x20\103\157\x6e\164\162\x6f\x6c"); $mail->addAddress($EMAIL1, "\x43\154\151\x65\156\x74\145"); if (strlen($EMAIL2) > 2) { $mail->addAddress($EMAIL2); } if ($ENVIAR_PDF > 0) { $mail->addAttachment($PATCH_PDF, $DATA_RELATORIO . "\56\160\x64\x66"); } $mail->isHTML(true); $mail->CharSet = "\x75\164\x66\x2d\70"; $mail->setLanguage = "\142\162"; if ($ENVIAR_PDF > 0) { $mail->Subject = "\122\x65\x6c\141\x74\xc3\263\x72\x69\x6f\40\x46\x69\x73\143\141\x6c\40\x64\x65\x20" . $DATA_RELATORIO . "\x20\x5b" . $now . "\135"; $mail->Body = "\x3c\x68\164\155\154\x3e\x3c\x62\x6f\144\x79\x3e\x3c\144\151\166\40\163\164\x79\154\145\75\x27\155\x61\162\x67\x69\x6e\72\x30\x20\x35\x25\73\x70\x61\x64\144\x69\156\147\72\61\x30\x70\x78\x20\x30\160\170\x20\63\60\x70\170\40\x30\160\x78\x3b\142\141\x63\153\147\x72\157\165\x6e\144\55\x63\157\x6c\x6f\162\x3a\x23\x66\146\x66\144\145\x37\73\x74\x65\170\x74\x2d\x61\154\x69\147\156\x3a\40\x63\145\156\164\145\162\x3b\142\157\162\144\145\162\x2d\x72\141\144\x69\x75\163\x3a\40\x37\x70\x78\x3b\47\76\x3c\144\151\x76\x20\163\164\171\154\145\x3d\47\146\x6f\x6e\164\x2d\163\x69\x7a\145\72\x31\64\160\x78\x3b\47\x3e" . $EMPRESA . "\74\57\144\151\166\x3e\74\150\63\40\163\x74\x79\154\145\x3d\47\143\x6f\154\x6f\162\72\43\x66\146\x32\70\x37\67\x3b\x27\x3e\x3c\x62\x3e\x43\150\x65\147\x6f\165\40\165\155\74\x62\162\76\x52\x65\x6c\x61\x74\xc3\xb3\x72\151\157\40\x46\x69\x73\143\141\154\x21\74\x2f\x62\x3e\74\x2f\x68\x33\76\x3c\144\x69\x76\x20\163\164\171\154\x65\x3d\x27\146\157\x6e\x74\x2d\x73\151\172\145\x3a\x31\x34\160\170\73\143\x6f\x6c\x6f\x72\72\43\x30\x30\67\47\x3e\x50\x61\162\x61\40\141\x62\x72\x69\x72\54\x20\x63\x6c\x69\x71\x75\x65\40\156\157\x20\x61\162\161\165\151\166\x6f\x20\145\x6d\40\x61\x6e\x65\170\157\56\74\x2f\142\76\74\57\144\151\166\x3e\x3c\x62\x72\x3e\x3c\163\x70\141\156\x20\163\x74\171\x6c\145\75\x27\x66\x6f\156\x74\x2d\x73\151\x7a\145\72\61\62\x70\170\73\143\157\154\x6f\162\72\x23\x35\65\x35\x3b\x27\76\x3c\x69\76\74\x62\76\x4f\142\162\x69\x67\141\144\x6f\x20\x70\157\162\x20\165\x74\151\154\151\x7a\x61\162\x20\156\157\x73\x73\157\40\x70\162\157\147\x72\x61\155\x61\x21\74\57\142\76\74\x2f\151\x3e\74\x2f\x73\x70\141\156\x3e\x3c\57\144\x69\x76\x3e\x3c\x2f\x62\157\144\171\76\74\57\x68\164\155\154\76"; } else { $mail->Subject = "\x41\x75\164\145\156\x74\x69\x63\x61\303\247\303\243\x6f\x20\144\145\40\x45\155\x61\151\x6c\40\55\40\x57\x65\142\111\143\x65\x20\133" . $now . "\135"; $mail->Body = "\74\x68\164\x6d\x6c\76\x3c\142\x6f\144\171\76\74\x64\x69\166\40\163\164\171\154\145\75\47\155\x61\x72\147\151\156\72\60\40\x35\45\x3b\160\x61\x64\x64\151\156\147\x3a\x31\x30\160\170\x20\60\160\x78\x20\x33\x30\x70\x78\x20\x30\160\x78\x3b\142\141\x63\x6b\147\162\x6f\165\x6e\144\x2d\143\x6f\x6c\157\x72\x3a\x23\146\146\146\144\145\x37\x3b\164\145\x78\x74\55\x61\x6c\x69\147\156\x3a\40\143\145\156\x74\145\x72\73\142\157\162\144\145\162\55\x72\x61\144\x69\x75\163\72\x20\x37\x70\x78\x3b\x27\x3e\74\x68\x34\x20\163\x74\x79\x6c\145\x3d\x27\143\157\x6c\x6f\162\x3a\43\146\146\62\70\67\x37\73\47\x3e\74\x62\76\x50\141\x72\x61\x62\xc3\xa9\156\163\54\x20\x65\x73\164\145\x20\105\x2d\155\141\151\154\x3c\142\x72\x3e\x65\x73\164\xc3\xa1\x20\x61\x70\164\x6f\x20\141\x20\162\x65\143\x65\x62\x65\162\x20\x72\x65\x6c\141\164\303\263\162\151\x6f\x73\40\x64\x6f\x3c\x62\x72\76\123\151\163\164\x65\x6d\x61\x20\x64\x65\x20\x4d\x6f\156\x69\164\157\162\141\155\145\156\164\x6f\40\x57\145\142\151\x63\x65\x21\74\x2f\142\x3e\74\57\150\63\76\74\144\x69\166\x20\x73\x74\x79\154\x65\x3d\x27\x66\x6f\x6e\x74\x2d\x73\x69\x7a\145\x3a\x31\x32\x70\170\73\x63\157\154\x6f\162\72\x23\x35\x35\x35\73\x27\x3e\74\151\76\74\142\x3e\x3c\x62\x72\76\x4f\142\x72\151\147\141\x64\x6f\40\160\x6f\x72\40\165\x74\x69\154\x69\172\141\162\x20\156\x6f\163\x73\x6f\x20\x70\x72\157\x67\162\141\155\x61\41\74\57\x62\x3e\x3c\57\x69\x3e\74\x2f\x64\x69\x76\x3e\74\x2f\142\x6f\x64\171\76\74\57\150\164\x6d\154\x3e"; } $mail->send(); return 1; } catch (Exception $e) { $msgerr = $mail->ErrorInfo; } return 0; } goto d93ot; CjPnb: function isGroupTelegram($val) { if (strlen($val) < 7) { return 0; } if ($val > 0) { return 0; } return preg_match("\176\136\50\50\x3f\x3a\134\x2b\174\55\x29\x3f\133\x30\55\x39\x5d\x2b\x29\x24\176", $val); } goto yPOY5; YmiG7: if ($statusFlag == 7) { $fp = fopen($base . "\57\x65\144\151\164\157\162\x2f\124\101\x42\105\x4c\x41\x53\x2f\164\x69\155\145\162\137\x61\x75\x74\x6f\x63\x6f\x6c", "\x77"); fwrite($fp, "\x37\46\x30\46\60\46\x30\x26\x30\46\60\46\x30\x2c" . $now . "\54" . $TDATA); fclose($fp); fun_chmod($base . "\57\145\144\x69\x74\x6f\x72\57\124\101\x42\105\114\x41\123\x2f\164\151\x6d\145\x72\137\x61\x75\164\x6f\x63\157\x6c"); if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "\x2f\x65\144\x69\x74\157\x72\x2f\124\101\102\x45\x4c\101\x53\57\x6c\x6f\x67\164\151\155\145\x72\x5f\141\x75\164\157\x63\157\x6c", "\141"); fwrite($fp, "\x37\x26\60\x26\60\x26\60\x26\x30\46\60\x26\x30\54" . $TDATA . "\xa"); fclose($fp); fun_chmod($base . "\x2f\x65\144\x69\x74\157\162\57\124\101\x42\105\x4c\101\x53\57\x6c\x6f\147\164\151\x6d\x65\x72\x5f\x61\x75\164\x6f\x63\x6f\154"); } die(0); } goto tATAr; wr0KU: $fp = fopen($base . "\x2f\145\144\x69\x74\157\x72\x2f\124\101\x42\105\x4c\x41\123\57\164\x69\x6d\145\162\137\x61\165\x74\x6f\143\x6f\154", "\167"); goto QHYHG; gumBI: $nDev; goto mXNGB; gYQCw: $nlen = sizeof($arr); goto NKBmJ; vL1b0: fun_chmod($base . "\57\145\144\x69\164\x6f\x72\x2f\124\101\102\x45\114\x41\123\57\x63\164\x72\x6c\x5f\x61\165\x74\157\143\157\154"); goto wr0KU; yyFQK: if ($arrRelat[11] < 1) { addlog("\x5b\x53\164\157\x70\40\62\135\40\103\157\154\x65\164\x61\x20\x64\x65\x73\x61\142\151\154\151\x74\141\x64\141\41", 0, 1); die(0); } goto GTduo; bl2Kt: $dia = intval(date("\144", $now)); goto a_3so; NFegh: $TDATA = $hor . "\72" . $min . "\x20\57\40" . $dia . "\x2d" . $mesAbrv[$mes] . "\x2d" . ($ano + $ANOBASE); goto h40Ry; DcBsr: if ($AC_MODE > 0) { autocoletaHTTP(); $mode = "\110\124\x54\120"; } else { autocoletaUDP(); $mode = "\125\104\120"; } goto uVjor; iixfc: $ndevcol = 0; goto F14i0; tATAr: if ($statusFlag & 1) { if (!is_file($base . "\57\x65\144\x69\164\157\162\x2f\124\x41\x42\105\114\x41\123\57\x73\145\164\x75\x70")) { addlog("\x5b\123\164\x6f\160\40\65\x5d\40\x41\x72\161\165\x69\166\157\x20\x73\x65\x74\x75\x70\x20\72\40\x4e\303\243\x6f\40\x6c\157\143\141\x6c\151\x7a\x61\x64\x6f\x21", 0, 1); die(0); } $arrsetup = explode("\54", file_get_contents($base . "\x2f\x65\144\x69\x74\157\162\57\x54\101\x42\x45\x4c\x41\x53\57\x73\145\x74\x75\160")); $urlPDF = $base . "\x2f\122\105\114\x41\124\117\122\111\117\57\x50\x44\106\x2f" . $anofile . "\57" . $mesfile . "\57" . $dia . "\55" . $mes . "\55" . $anofile . "\x2e\160\x64\x66"; if (~$statusFlag & 2 && $arrsetup[6] > 0 && isGroupTelegram($arrRelat[5]) > 0) { if ($arrsetup[6] > 1) { if (sendPDFTelegram($arrRelat[5], $urlPDF, $TOKEN) > 0) { addlog("\x28\61\x29\x20\x52\x65\x6c\x61\164\303\263\162\151\x6f\40\146\x69\163\143\x61\x6c\40\x65\156\x76\x69\x61\x64\157\x20\x63\157\x6d\40\163\165\x63\x65\x73\163\x6f\40\x61\157\x20\x67\162\165\160\x6f\40\124\145\154\x65\x67\x72\x61\x6d\x21\40\50\x32\x78\x29", 0, 0); $flagFIM = 7; } else { addlog("\x28\x32\51\40\x52\x65\154\141\164\303\xb3\162\x69\x6f\x20\146\x69\163\x63\x61\154\x20\156\xc3\xa3\157\x20\145\156\166\151\141\x64\157\x20\141\157\40\x67\162\165\x70\x6f\x20\124\145\x6c\x65\147\162\141\155\41\40\50\x32\170\x29", 0, 0); } } else { if (sendMsgTelegram($arrRelat[5], $AC_TELEGRAM_1 . $AC_TELEGRAM_2, $TOKEN) > 0) { addlog("\x28\63\51\x20\x52\x65\154\141\164\303\xb3\162\x69\x6f\40\x46\x69\163\143\141\x6c\x20\75\76\40\x4e\x6f\164\151\146\151\143\x61\xc3\xa7\303\xa3\157\x20\145\156\x76\151\x61\144\x61\x20\143\x6f\x6d\40\x73\x75\x63\145\163\x73\x6f\40\141\157\x20\x67\x72\x75\160\x6f\x20\x54\x65\x6c\x65\x67\162\141\155\41\40\50\x32\170\x29", 0, 0); } else { addlog("\50\64\x29\40\122\145\154\x61\x74\303\263\162\151\x6f\x20\x46\x69\x73\x63\141\154\40\75\x3e\x20\116\157\x74\151\x66\151\x63\x61\303\247\xc3\243\157\x20\156\xc3\243\157\x20\x65\156\x76\151\141\x64\x61\40\141\x6f\40\147\162\165\160\157\x20\x54\x65\154\145\147\x72\141\x6d\41\x20\x28\62\x78\x29", 0, 0); } $flagFIM = $flagFIM | 2; } } $REGEX = "\x2f\136\50\x5b\141\x2d\x7a\101\55\x5a\60\x2d\x39\134\x2e\x5d\53\100\53\133\141\x2d\x7a\101\x2d\x5a\135\x2b\50\134\x2e\51\53\x5b\x61\x2d\172\101\x2d\x5a\x5d\x7b\62\54\63\x7d\x29\x24\x2f"; if (~$statusFlag & 4 && $HABUSODEEMAIL > 0 && $arrsetup[6] > 1 && (preg_match($REGEX, $arrRelat[2]) || preg_match($REGEX, $arrRelat[3]))) { $dtr = $dia . "\x2d" . $mes . "\x2d" . $anofile; if (sendEMAIL(1, $arrRelat[2], $arrRelat[3], $urlPDF, $dtr, $arrRelat[0]) > 0) { addlog("\50\x35\x29\40\122\145\154\141\x74\xc3\263\x72\151\x6f\x20\x66\x69\x73\143\141\x6c\x20\x65\x6e\166\151\141\x64\157\x20\x63\157\x6d\40\163\165\x63\x65\x73\x73\157\40\141\157\x20\145\x6d\x61\x69\154\40\162\145\x67\x69\x73\164\x72\x61\144\157\x21\40\x28\62\170\51", 0, 0); } else { addlog("\50\66\x29\x20\122\145\154\x61\x74\303\263\x72\x69\x6f\40\x6e\xc3\243\157\40\x65\x6e\166\x69\x61\x64\157\x20\141\157\40\145\155\141\x69\x6c\x20\x72\x65\x67\x69\x73\x74\162\141\144\x6f\41\x20\50\x32\170\x29", 0, 0); } } $arrC[0] = "\x37\x2c" . $temp[1]; $bufcoleta = implode("\x23", $arrC); $fp = fopen("\145\x64\x69\x74\x6f\x72\x2f\x54\x41\x42\x45\114\x41\123\x2f\x63\164\162\x6c\137\141\x75\x74\157\143\157\154", "\167"); if (fwrite($fp, $bufcoleta) === FALSE) { fclose($fp); addlog("\x5b\123\x74\x6f\x70\40\x36\135\40\143\x74\162\154\137\x61\x75\x74\x6f\x63\157\154\x20\72\x20\x45\x72\x72\157\40\x6e\141\x20\x67\x72\x61\166\x61\303\xa7\xc3\243\x6f\41", 0, 1); die(0); } fclose($fp); $fp = fopen($base . "\x2f\x65\x64\x69\x74\157\162\57\124\101\x42\105\x4c\101\x53\x2f\x74\151\x6d\x65\162\137\141\x75\x74\157\143\x6f\x6c", "\167"); fwrite($fp, "\x37\x26\60\46\x30\46\x30\x26\60\46\60\x26\60\x2c" . $now . "\x2c" . $TDATA); fclose($fp); fun_chmod($base . "\x2f\145\x64\x69\164\x6f\x72\57\124\x41\x42\x45\x4c\101\123\57\164\151\155\x65\162\x5f\x61\165\x74\x6f\x63\x6f\154"); if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "\57\x65\x64\151\x74\x6f\162\57\124\x41\x42\x45\x4c\101\123\x2f\154\x6f\147\x74\x69\x6d\145\162\137\x61\x75\164\157\143\157\154", "\141"); fwrite($fp, "\67\x26\60\x26\60\x26\60\46\x30\46\x30\x26\60\54" . $TDATA . "\12"); fclose($fp); fun_chmod($base . "\57\x65\x64\x69\x74\157\x72\57\124\x41\x42\105\x4c\x41\123\x2f\x6c\x6f\x67\164\151\x6d\x65\162\137\x61\165\x74\157\143\x6f\x6c"); } die(0); } goto qA2MN; dWmWr: function writeColetaformatPDF() { global $arrC, $now, $bufdata, $listVarr, $TABMESFILE, $base; $coleta = array(); for ($i = 1; $i < 101; $i++) { $temp = explode("\52", $arrC[$i]); if ($temp[0] == "\x37" || $temp[0] == "\64") { array_push($coleta, $temp[1]); } } $bufdata = implode("\x2a", $coleta) . "\x2a" . $listVarr . "\105\x4e\x44\x46"; $dia = intval(date("\144", $now)); $mes = intval(date("\155", $now)); $anofile = date("\131", $now); $mesfile = $TABMESFILE[$mes]; $dirRelat = $base . "\57\122\105\x4c\101\x54\x4f\122\111\117\57\103\117\114\x45\x54\x41\57"; if (!is_dir($dirRelat)) { mkdir($dirRelat, 511, true); } $dirRelat .= $anofile . "\57"; if (!is_dir($dirRelat)) { mkdir($dirRelat, 511, true); } $dirRelat .= $mesfile . "\x2f"; if (!is_dir($dirRelat)) { mkdir($dirRelat, 511, true); } $dirRelat .= $dia . "\x2d" . $mes . "\x2d" . $anofile . "\56\164\x78\164"; $fp = fopen($dirRelat, "\167"); if (fwrite($fp, $bufdata) === FALSE) { fclose($fp); addlog("\133\x31\63\x5d\40\x2d\40\105\162\x72\x6f\40\x64\x75\162\x61\156\164\x65\40\x67\162\141\x76\x61\303\247\303\243\x6f\x20\x64\141\40\x63\x6f\154\x65\164\141\40\144\x6f\40\144\151\x61", 0, 0); die(0); } fclose($fp); return; } goto JIB5G; acevc: function fun_chmod($patch) { global $PHPERR; if ($PHPERR > 0) { return; } chmod($patch, 511); return; } goto CjPnb; okv_X: function addlog($msg, $newday, $stopCron) { global $base, $HAB_LOGCP, $TDATA, $hor, $min; if ($HAB_LOGCP > 0) { if ($newday > 0) { $msg = "\75\75\75\75\75\75\x3d\x3d\x3d\75\75\x3d\x3d\75\75\x3d\75\x3d\75\75\75\x3d\x3d\75\75\x3d\x3d\75\75\x3d\x3d\x3d\75\x3d\x3d\75\xa\123\x54\x41\x52\124\40\103\x4f\114\105\124\101\x20\x3d\76\40" . $TDATA . "\12\75\75\75\x3d\75\75\x3d\x3d\75\x3d\75\75\x3d\x3d\75\75\75\75\x3d\x3d\75\x3d\x3d\75\75\75\x3d\75\75\x3d\x3d\75\75\x3d\75\x3d\12"; } else { $msg = $hor . "\x3a" . $min . "\46" . $msg . "\xa"; } $fp = fopen($base . "\57\145\x64\x69\164\157\x72\57\x54\x41\x42\x45\x4c\101\x53\x2f\x61\x75\164\x6f\143\157\154\x2e\x6c\157\147", "\141"); fwrite($fp, $msg); fclose($fp); fun_chmod($base . "\57\x65\144\x69\164\x6f\162\x2f\x54\101\x42\105\x4c\101\123\57\141\165\164\157\143\157\154\56\x6c\157\147"); if ($stopCron > 0) { shell_exec("\x73\165\144\157\40\x73\171\x73\x74\145\x6d\x63\164\154\x20\163\x74\157\x70\x20\x63\162\x6f\x6e"); $fp = fopen($base . "\57\x65\x64\151\x74\157\x72\57\x54\101\102\105\114\101\x53\x2f\x74\151\x6d\145\162\x5f\141\x75\x74\157\x63\x6f\x6c", "\167"); fwrite($fp, $msg); fclose($fp); } } return; } goto acevc; h40Ry: $tsAtual = intval($hor) * 60 + intval($min); goto qU9f6; JIB5G: function reqCURL($url, $get, $comandoPOST, $outttime) { global $response, $bufdata, $AC_TIMEOUT; $curl = curl_init(); if ($get > 0) { curl_setopt_array($curl, array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 0, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => $outttime, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\107\x45\x54")); $response = curl_exec($curl); $information = curl_getinfo($curl); curl_close($curl); return intval($information["\x68\x74\x74\x70\137\x63\157\x64\x65"]); } curl_setopt_array($curl, array(CURLOPT_URL => "\x6c\x6f\x63\141\x6c\x68\x6f\163\x74\57\122\x45\114\101\x54\117\122\x49\x4f\57", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 0, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => $outttime, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\x4f\123\124", CURLOPT_POSTFIELDS => array($comandoPOST => $bufdata))); $response = curl_exec($curl); $information = curl_getinfo($curl); curl_close($curl); return intval($information["\150\164\x74\160\137\x63\157\144\145"]); } goto NxRs1; F14i0: $nenhumacoleta = 0; goto R1aQj; ms0pQ: function autocoletaUDP() { global $lu, $nDev, $dia, $mes, $ano, $arrC, $nlen, $arr, $response; global $arrIPTable, $flagFIM, $nOff, $listVarr; global $AC_PORT, $AC_WTIME, $AC_REFISHTIMER; global $ndevcol, $nenhumacoleta, $colIncompleta, $devErro, $colErro1, $colErro2; $flagError = 0; $flagFIM = 1; $ndevcol = 0; $nenhumacoleta = 0; $colIncompleta = 0; $devErro = 0; $colErro1 = 0; $colErro2 = 0; $socket = socket_create(AF_INET, SOCK_DGRAM, 0); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array("\x73\x65\143" => 2, "\165\x73\x65\x63" => 0)); for ($i = 3; $i < $nlen; $i++) { $lu = explode("\x2c", $arr[$i]); if ($lu[0] > 0) { $ndevcol++; $nDev = intval($lu[1]); $dnsName = "\167\x69\143" . strval($nDev); if ($nDev < 10) { $dnsName = "\167\151\x63\x30" . strval($nDev); } $fluxControl = intval(substr($arrC[$nDev + 1], 0, 1)); if ($fluxControl != 7 && $fluxControl != 1 && $fluxControl != 2) { $host = getIP(); if (socket_connect($socket, $host, $AC_PORT)) { $msg = "\147\x65\x74\x63\157\154\144\x69\x61\165\144\160\x2c" . $dia . "\x2d" . $mes . "\55" . $ano; socket_write($socket, $msg, strlen($msg)); $response = socket_read($socket, $AC_PORT); if (substr($response, 0, 2) == "\x4f\x4b") { $arrpri = explode("\x40", $response); $arrHead = explode("\54", $arrpri[0]); if ($arrHead[0] == "\x4f\113") { if ($arrHead[1] == $dnsName) { if ($arrHead[8] > 0) { if ($arrHead[7] == $arrHead[8]) { $listVarr .= $nDev . "\72\x37\54"; $arrC[$nDev + 1] = "\67\x2a" . $response; } else { $arrC[$nDev + 1] = "\64\52" . $response; $listVarr .= $nDev . "\72\x34\54"; $flagFIM = 0; $colIncompleta++; } } else { $arrC[$nDev + 1] = "\x33\x2a" . $response; $listVarr .= $nDev . "\x3a\x33\54"; $flagFIM = 0; $nenhumacoleta++; } } else { $colErro2++; $arrC[$nDev + 1] = "\x32\x2a\106\105\137\x44\116\123\x4e\x41\x4d\105"; $listVarr .= $nDev . "\72\x32\x2c"; addlog("\50\61\x35\51\40\x55\x44\120\40\106\x45\137\x44\116\123\116\x41\x4d\x45\x20" . $dnsName . "\x3a\x20" . substr($response, 0, 100), 0, 0); } } else { $colErro1++; $arrC[$nDev + 1] = "\61\52\106\105\x5f\106\117\x52\x4d\x41\x54"; $listVarr .= $nDev . "\72\x31\54"; addlog("\50\61\x36\51\x20\x55\x44\120\40\106\105\x5f\x46\117\x52\115\x41\x54\x20" . $dnsName . "\72\40" . substr($response, 0, 100), 0, 0); } } else { $devErro++; $flagError = 1; $arrC[$nDev + 1] = "\x35\52" . $response; $listVarr .= $nDev . "\72\x35\54"; $flagFIM = 0; } } else { $listVarr .= $nDev . "\72\x45\x43\130\54"; } } else { if ($fluxControl == 7) { $listVarr .= $nDev . "\72\x37\54"; } else { $listVarr .= $nDev . "\x3a" . $fluxControl . "\x2c"; } } } else { $nDev = intval($lu[1]); $listVarr .= $nDev . "\x3a\x30\x2c"; } } socket_close($socket); return $flagError; } goto xWdA5; mXNGB: $bufdata; goto iixfc; WGezO: $msgT = "\x63\157\155\40\x73\165\143\145\163\163\x6f\x20"; goto MYMki; PWKeh: fclose($fp); goto SAJjx; GHQUH: if (fwrite($fp, $bufcoleta) === FALSE) { fclose($fp); addlog("\x5b\123\164\157\x70\x20\61\63\x5d\x20\105\162\162\157\40\156\141\40\147\x72\141\166\x61\xc3\247\303\243\157\40\144\145\x20\x63\x74\162\x6c\x5f\141\x75\164\157\x63\x6f\154\x21", 0, 1); die(0); } goto onQdN; SAJjx: fun_chmod($base . "\57\x65\144\x69\164\157\162\57\x54\101\102\x45\x4c\x41\x53\57\x74\151\x6d\145\x72\x5f\x61\x75\164\157\x63\x6f\x6c"); goto YtC6m; X0yhh: $arrC = explode("\43", $controle); goto P6b9v; yPOY5: function isIPV4($ip) { return preg_match("\57\136\x28\x28\x5b\x31\x2d\x39\x5d\77\133\60\x2d\71\x5d\174\61\x5b\60\x2d\71\x5d\x7b\62\x7d\174\62\x5b\60\x2d\64\x5d\133\60\x2d\71\135\x7c\x32\65\133\x30\x2d\65\x5d\51\56\x29\173\63\175\x28\x5b\x31\x2d\71\x5d\x3f\x5b\x30\x2d\71\x5d\174\x31\x5b\x30\x2d\x39\135\173\x32\x7d\x7c\x32\133\x30\x2d\x34\135\133\x30\x2d\x39\135\174\62\65\133\60\x2d\x35\135\51\44\x2f", $ip); } goto JmIV9; onQdN: fclose($fp); goto vL1b0; qOZAT: if ($tsAtual < $tsColetar) { $fp = fopen($base . "\57\x65\x64\x69\x74\x6f\x72\x2f\x54\x41\102\x45\114\101\x53\x2f\x74\x69\x6d\145\162\137\141\165\x74\x6f\x63\x6f\154", "\167"); fwrite($fp, "\60\46\60\46\x30\x26\60\46\60\x26\x30\x26\60\x2c" . $now . "\54" . $TDATA); fclose($fp); fun_chmod($base . "\57\x65\144\151\164\x6f\x72\x2f\x54\x41\x42\105\x4c\x41\x53\x2f\x74\x69\x6d\145\162\x5f\141\165\x74\x6f\143\x6f\x6c"); if ($LOGTIMERCOLETA > 0) { $fp = fopen($base . "\57\145\144\x69\164\157\x72\57\124\101\x42\x45\114\x41\123\57\x6c\x6f\147\x74\151\155\145\162\x5f\141\x75\164\157\143\157\154", "\141"); fwrite($fp, "\x30\46\60\46\60\46\x30\46\60\46\60\x26\60\x2c" . $TDATA . "\xa"); fclose($fp); fun_chmod($base . "\57\145\144\x69\164\157\x72\57\124\x41\102\x45\x4c\x41\x53\x2f\x6c\157\x67\164\x69\x6d\145\162\137\141\165\x74\x6f\x63\157\x6c"); } die(0); } goto tv1Rj; uqUWw: if ($flagFIM == 1) { writeColetaformatPDF(); $bufdata = "\x31\x2c\x31\x2c" . $dia . "\55" . $mes . "\55" . $anofile . "\x2a" . $bufdata; reqCURL($base . "\x2f\x52\x45\x4c\x41\x54\x4f\x52\111\117\57", 0, "\x77\162\151\164\x65\x63\x6f\x6c\x65\x74\x61", $AC_TIMEOUT); if ($response == "\127\122\111\124\105\x43\x4f\114\x45\x54\101\117\x4b") { addlog("\x28\x38\51\x20\x52\145\154\x61\x74\303\263\x72\x69\157\40\106\x69\x73\143\x61\154\x20\x67\145\162\141\144\157\x20\143\x6f\x6d\40\x73\x75\x63\145\x73\x73\x6f\x21", 0, 0); } else { addlog("\x5b\123\x74\157\160\x20\x31\x31\x5d\x20\x45\x72\162\157\40\156\141\x20\147\x72\141\166\141\xc3\xa7\303\xa3\x6f\x20\144\157\40\x52\145\x6c\x61\x74\303\xb3\162\x69\x6f\40\x46\151\x73\x63\141\154\40\50\120\104\106\51\x21", 0, 1); die(0); } if (!is_file($base . "\x2f\x65\x64\x69\164\x6f\x72\x2f\x54\x41\102\105\114\x41\x53\57\163\145\x74\x75\160")) { addlog("\x5b\x53\x74\x6f\160\x20\61\62\x5d\x20\x41\x72\x71\x75\151\x76\157\40\x73\145\x74\x75\x70\40\72\40\x4e\303\xa3\x6f\x20\x6c\x6f\x63\x61\x6c\x69\x7a\141\x64\157\x21", 0, 1); die(0); } $arrsetup = explode("\54", file_get_contents($base . "\57\x65\x64\x69\164\x6f\x72\x2f\x54\x41\102\x45\114\101\123\x2f\163\145\164\165\160")); $urlPDF = $base . "\x2f\x52\x45\114\101\x54\x4f\x52\x49\117\x2f\x50\x44\106\x2f" . $anofile . "\57" . $mesfile . "\57" . $dia . "\55" . $mes . "\55" . $anofile . "\56\160\x64\x66"; if ($arrsetup[6] > 0 && isGroupTelegram($arrRelat[5]) > 0 && strlen($arrRelat[4]) > 5) { if ($arrsetup[6] > 1) { if (sendPDFTelegram($arrRelat[5], $urlPDF, $TOKEN) > 0) { addlog("\50\x39\51\x20\x52\x65\154\x61\x74\303\xb3\x72\151\157\x20\x66\x69\x73\x63\x61\154\40\x65\156\166\x69\141\144\x6f\40\143\157\x6d\40\163\165\143\x65\x73\x73\157\40\141\157\40\147\162\x75\160\x6f\40\124\145\x6c\x65\147\162\141\155\x21\40\x28\61\x78\51", 0, 0); $flagFIM = $flagFIM | 2; } else { addlog("\50\x31\60\x29\40\x52\145\x6c\x61\164\xc3\263\162\x69\x6f\40\x66\151\x73\x63\141\154\x20\156\xc3\xa3\x6f\40\145\x6e\x76\x69\141\x64\157\x20\x61\157\40\x67\162\165\x70\x6f\40\124\145\154\145\x67\162\x61\x6d\41\x20\50\x31\170\x29", 0, 0); } } else { if (sendMsgTelegram($arrRelat[5], $AC_TELEGRAM_1 . $msgT . $AC_TELEGRAM_2, $TOKEN) > 0) { addlog("\50\61\x31\51\40\x52\x65\154\141\164\xc3\263\162\x69\x6f\40\106\151\x73\x63\141\x6c\x20\75\x3e\x20\116\x6f\x74\x69\146\151\x63\141\303\xa7\xc3\xa3\x6f\x20\x65\156\166\x69\x61\144\141\x20\143\157\155\x20\163\165\143\x65\163\x73\157\40\x61\x6f\x20\x67\x72\x75\160\157\x20\x54\145\x6c\145\x67\x72\x61\x6d\x21\40\x28\61\170\x29", 0, 0); $flagFIM = $flagFIM | 2; } else { addlog("\x28\x31\62\51\x20\122\x65\154\x61\x74\xc3\xb3\x72\151\157\x20\106\151\x73\143\x61\x6c\x20\75\x3e\40\116\x6f\x74\x69\x66\x69\x63\x61\303\xa7\303\243\x6f\x20\x6e\xc3\xa3\x6f\x20\145\x6e\x76\x69\141\x64\x61\x20\x61\157\40\147\x72\x75\x70\157\x20\124\145\x6c\145\x67\x72\x61\155\x21\x20\x28\x31\170\51", 0, 0); } } } else { $flagFIM = $flagFIM | 2; } $REGEX = "\57\x5e\x28\x5b\x61\x2d\172\x41\55\132\x30\x2d\71\134\x2e\x5d\x2b\100\x2b\133\141\55\x7a\101\x2d\132\x5d\x2b\x28\x5c\x2e\x29\x2b\x5b\x61\x2d\x7a\101\x2d\132\135\173\62\x2c\63\x7d\51\44\57"; if ($HABUSODEEMAIL > 0 && $arrsetup[6] > 1 && (preg_match($REGEX, $arrRelat[2]) || preg_match($REGEX, $arrRelat[3]))) { $dtr = $dia . "\55" . $mes . "\x2d" . $anofile; if (sendEMAIL(1, $arrRelat[2], $arrRelat[3], $urlPDF, $dtr, $arrRelat[0]) > 0) { addlog("\x28\x31\63\x29\x20\x52\145\x6c\141\x74\xc3\263\x72\x69\x6f\x20\x66\151\163\x63\x61\x6c\40\x65\x6e\x76\151\x61\144\x6f\40\x63\x6f\x6d\40\x73\x75\143\x65\163\163\157\40\x61\157\40\145\x6d\x61\151\x6c\x20\162\145\147\151\163\164\162\x61\x64\157\41\40\x28\x31\x78\x29", 0, 0); $flagFIM = $flagFIM | 4; } else { addlog("\x28\x31\x34\x29\40\122\x65\x6c\x61\x74\xc3\xb3\x72\151\157\x20\x6e\xc3\243\157\x20\145\x6e\x76\151\x61\x64\x6f\x20\141\x6f\40\x65\x6d\141\x69\154\x20\162\x65\147\x69\x73\x74\162\x61\x64\157\41\x20\x28\61\170\x29", 0, 0); } $statusFlag = $statusFlag | 4; } else { $flagFIM = $flagFIM | 4; } } goto niYDe; N1g3I: $hor = date("\x48", $now); goto gzFey; eBCw0: include "\x63\x6f\156\163\164\141\156\x74\x65\163\56\160\150\160"; goto Oh3VF; tpmXF: $ano = intval(date("\171", $now)); goto WfiTv; MUP7_: if (preg_match("\x2f\133\x30\x2d\62\135\x5b\x30\x2d\71\x5d\72\x5b\60\x2d\65\135\133\60\x2d\x39\135\x2f", $ENVIO_OBRIGATORIO) > 0) { $sendH = substr($ENVIO_OBRIGATORIO, 0, 2); $sendM = substr($ENVIO_OBRIGATORIO, 3); $send = intval($sendH) * 60 + intval($sendM); } else { $send = 0; } goto xfVGk; OjMHO: if (!is_file($base . "\x2f\145\144\x69\164\157\x72\57\124\101\102\105\114\101\x53\57\x70\x61\162\141\155\145\x74\162\157\163")) { addlog("\x5b\x53\x74\157\160\x20\71\135\40\x41\162\161\x75\151\166\x6f\40\160\x61\x72\x61\155\145\x74\x72\x6f\163\x20\72\40\x4e\xc3\243\157\40\154\157\143\141\x6c\151\x7a\x61\144\157\41\x20", 0, 1); die(0); } goto pGxZP; xWdA5: function autocoletaHTTP() { global $lu, $nDev, $dia, $mes, $ano, $arrC, $nlen, $arr, $response; global $arrIPTable, $flagFIM, $nOff, $listVarr, $PASSOCA, $AC_TIMEOUT; global $ndevcol, $nenhumacoleta, $colIncompleta, $devErro, $colErro1, $colErro2; $flagError = 0; $flagFIM = 1; $ndevcol = 0; $nenhumacoleta = 0; $colIncompleta = 0; $devErro = 0; $colErro1 = 0; $colErro2 = 0; for ($i = 3; $i < $nlen; $i++) { $lu = explode("\x2c", $arr[$i]); if ($lu[0] > 0) { $ndevcol++; $nDev = intval($lu[1]); $dnsName = "\167\x69\x63" . strval($nDev); if ($nDev < 10) { $dnsName = "\x77\151\x63\x30" . strval($nDev); } $fluxControl = intval(substr($arrC[$nDev + 1], 0, 1)); if ($fluxControl != 7 && $fluxControl != 1 && $fluxControl != 2) { $url = "\x68\x74\x74\160\x3a\x2f\x2f" . getIP() . "\x2f\147\x65\x74\143\157\x6c\x64\151\141\77\x77\153\145\171\x3d" . $dia . "\x2d" . $mes . "\55" . $ano . "\46\160\141\163\163\x3d" . base64_decode($PASSOCA[1]); $respHTTP = reqCURL($url, 1, "\x6e\165\x6c\154", $AC_TIMEOUT); if ($respHTTP == 200) { $arrpri = explode("\100", $response); $arrHead = explode("\54", $arrpri[0]); if ($arrHead[0] == "\117\x4b") { if ($arrHead[1] == $dnsName) { if ($arrHead[8] > 0) { if ($arrHead[7] == $arrHead[8]) { $listVarr .= $nDev . "\72\x37\54"; $arrC[$nDev + 1] = "\x37\52" . $response; } else { $arrC[$nDev + 1] = "\x34\x2a" . $response; $listVarr .= $nDev . "\x3a\64\54"; $flagFIM = 0; $colIncompleta++; } } else { $arrC[$nDev + 1] = "\x33\x2a" . $response; $listVarr .= $nDev . "\x3a\63\54"; $flagFIM = 0; $nenhumacoleta++; } } else { $colErro2++; $arrC[$nDev + 1] = "\62\x2a\x46\105\x5f\104\116\123\x4e\x41\x4d\x45"; $listVarr .= $nDev . "\x3a\62\x2c"; addlog("\50\61\x37\51\x20\x48\124\x54\120\40\x46\x45\x5f\x44\x4e\123\116\x41\x4d\x45\x20" . $dnsName . "\72\40" . substr($response, 0, 100), 0, 0); } } else { $colErro1++; $arrC[$nDev + 1] = "\x31\52\106\105\137\x46\117\122\115\x41\124"; $listVarr .= $nDev . "\x3a\x31\x2c"; addlog("\50\x31\70\51\40\x48\x54\124\x50\x20\x46\105\137\x46\117\x52\115\x41\124\x20" . $dnsName . "\72\x20" . substr($response, 0, 100), 0, 0); } } else { $devErro++; $flagError = 1; $arrC[$nDev + 1] = "\65\x2a" . $respHTTP; $listVarr .= $nDev . "\x3a\65\54"; $flagFIM = 0; } } else { if ($fluxControl == 7) { $listVarr .= $nDev . "\x3a\x37\x2c"; } else { $listVarr .= $nDev . "\x3a" . $fluxControl . "\54"; } } } else { $nDev = intval($lu[1]); $listVarr .= $nDev . "\72\60\54"; } } return $flagError; } goto dWmWr; a_3so: $mes = intval(date("\155", $now)); goto tpmXF; xfVGk: date_default_timezone_set($TIMEZONE); goto zHuhv; joe2S: if (sizeof($arrIPTable) != 102) { addlog("\x5b\x53\164\x6f\160\x20\70\135\x20\x54\141\142\145\x6c\x61\x20\111\120\x54\x61\142\154\145\x20\x3a\x20\106\x6f\162\x6d\141\164\x6f\x20\x69\x6c\x65\x67\141\x6c\x21", 0, 1); die(0); } goto YPsXQ; Oh3VF: $response = ''; goto JiBES; faARR: $colErro2 = 0; goto LZD5F; QHYHG: fwrite($fp, $flagFIM . "\x26" . $ndevcol . "\46" . $nenhumacoleta . "\x26" . $colIncompleta . "\x26" . $devErro . "\x26" . $colErro1 . "\x26" . $colErro2 . "\54" . $now . "\54" . $TDATA); goto PWKeh; MKAV0: $mesfile = $TABMESFILE[$mes]; goto NFegh; d93ot: ?>

Function Calls

None

Variables

None

Stats

MD5 27d31d23af06589de6891408c23aa832
Eval Count 0
Decode Time 53 ms