Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
scripts
File Content:
SSL_Mail.php
<?php require('/etc/sentora/panel/cnf/db.php'); include('/etc/sentora/panel/dryden/db/driver.class.php'); include('/etc/sentora/panel/dryden/debug/logger.class.php'); include('/etc/sentora/panel/dryden/runtime/dataobject.class.php'); include('/etc/sentora/panel/dryden/runtime/hook.class.php'); include('/etc/sentora/panel/dryden/runtime/hash.class.php'); include('/etc/sentora/panel/dryden/sys/versions.class.php'); include('/etc/sentora/panel/dryden/ctrl/options.class.php'); include('/etc/sentora/panel/dryden/ctrl/users.class.php'); include('/etc/sentora/panel/dryden/ctrl/auth.class.php'); include('/etc/sentora/panel/dryden/fs/director.class.php'); include('/etc/sentora/panel/dryden/fs/filehandler.class.php'); include('/etc/sentora/panel/inc/dbc.inc.php'); try { $zdbh = new db_driver("mysql:host=" . $host . ";dbname=" . $dbname . "", $user, $pass); $mysqli=mysqli_connect($host,$user, $pass); } catch (PDOException $e) { exit(); } $domain = runtime_xss::xssClean(runtime_sanatizeItem::sanatizeItem($argv[1],"url")); $to_email_id = runtime_xss::xssClean(runtime_sanatizeItem::sanatizeItem($argv[2],"email")); $sql = "select * from x_vhosts where vh_name_vc='".$domain."' AND vh_deleted_ts IS NULL"; if ($user_result=mysqli_query($mysqli,$sql)) { $rowcount=mysqli_num_rows($user_result); if($rowcount <> 0) { shell_exec(" /usr/local/letsencrypt/./certbot-auto certificates > /var/log/letsencrypt/sslrenew.log"); $domain_certbot = shell_exec("grep -ni 'Domains' /var/log/letsencrypt/sslrenew.log"); $line_cerbot = explode("\n",$domain_certbot); $line=array(); $domain_list=array(); foreach($line_cerbot as $key=>$value) { if(trim($value)!="") { $line_num = explode(":", $value); $line[] = trim($line_num[0]) + 3; $domain_list_temp=explode(":",$value); $domain_list_temp1=explode(",",$domain_list_temp[2]); $domain_list[]=trim($domain_list_temp1[0]); } } foreach($domain_list as $key=>$value) { if(trim($value)!="") { $domain_lists_temp=explode(" ",$value); $domain_lists[]=trim($domain_lists_temp[0]); } } if((in_array(trim($domain) ,$domain_lists))) { shell_exec("echo 'completed' > /var/log/letsencrypt/$domain.log"); $res = "success"; } else { global $zdbh; echo $domain."\n"; echo "UPDATE x_ssl SET ssl_status='-1' WHERE ssl_doamin=$domain AND ssl_delete IS NULL \n"; $numrows = $zdbh->prepare("UPDATE x_ssl SET ssl_status='-1' WHERE ssl_doamin=:domain AND ssl_status=0 AND ssl_delete IS NULL"); $numrows->bindParam(':domain', $domain); $ret = $numrows->execute(); echo $ret."\n"; shell_exec("echo 'failed' > /var/log/letsencrypt/$domain.log"); $res = "failed"; } $email_id = "tech@ovipanel.com"; $headers = "From: $email_id" . "\r\n" ; $headers .= "MIME-Version: 1.0\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n"; $subject = "OVIPanel - SSL status for $domain"; if($res == "success") { $body = "Dear Client,<br><br> SSL successfully installed for your domain $domain . Kindly Check it, If its not working contact our OVIPanel support team. <br><br><br><br> Thank You."; } else { $body = "Dear Client,<br><br> We are not able to install SSL for your domain $domain . For more details check log on /var/log/letsencrypt/letsencrypt.log Kindly contact our OVIPanel support team. <br><br><br><br> Thank You."; } if (mail($to_email_id,$subject,$body,$headers)) { echo "mail sent with email body $body to $to_email_id \n" ; } else echo "mail not sent with email body $body to $to_email_id \n" ; } } ?>
Edit
Download
Unzip
Chmod
Delete