| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/api.pacim.de/web/src/PaCIM/ |
Upload File : |
<?php
//header("Content-Type: text/html; charset=utf-8");
//if( !isset( $_GET['token'] ) || ( isset( $_GET['token'] ) && $_GET['token'] != "eFD6dx2G4RFBkrYS7Z87" ) ) die('permission denied');
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Etc/UTC');
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require_once 'src/Exception.php';
require_once 'src/PHPMailer.php';
require_once 'src/SMTP.php';
/*if (extension_loaded('openssl')) {
echo 'openssl extension loaded.';}*/
//die();
//require_once("includes/phpmailer/PHPMailerAutoload.php");
// E-Mail Configuration
define( "MAIL_USER", "noreply@pacim.de" );
define( "MAIL_PASS", "UjUf5Yj6!o" );
define( "MAIL_SERVER", "cloud.pacim.de" );
define( "MAIL_SERVER_PORT", 587 );
define( "MAIL_SERVER_SECURE", 'tls' );
define( "MAIL_SENDER", "noreply@pacim.de" );
define( "MAIL_SENDER_NAME", "api.pacim.de" );
// Buchungen von deutsche-caravan.de holen
//$array_mails = curl_get_file_contents('https://www.deutsche-caravan.de/crons/mail.php?token=cixx,3%|DLz7o731%3CzYF');
//$array_mails = json_decode( $array_mails );
// Mail an info@deutsche-caravan.de
/*sendEmail(
'report@cloud.pacim.de',
"POSSIBLE ATTACK on " . $_SERVER['SERVER_NAME'],
content_mail( $_SERVER ),
TRUE
);*/
function content_mail( $insert_array ) {
$array_unset = array(
'FUSIO_PROJECT_KEY',
'FUSIO_URL',
'FUSIO_ENV',
'FUSIO_DB_NAME',
'FUSIO_DB_USER',
'FUSIO_DB_PW',
'FUSIO_DB_HOST',
'PROVIDER_FACEBOOK_SECRET',
'PROVIDER_GOOGLE_SECRET',
'PROVIDER_GITHUB_SECRET',
'RECAPTCHA_SECRET',
'SQLITE_1_DB',
'SYMFONY_DOTENV_VARS'
);
foreach( $array_unset as $key ) {
if( isset( $insert_array[ $key ] ) ) unset( $insert_array[ $key ] );
}
$insert = array(
'CUSTOM_REQUEST' => '<a href="' . getFullUrl() . '" target="_blank">' . getFullUrl() . '</a>',
'CUSTOM_IP_TRACK' => '<a href="https://iplocation.io/ip-whois-lookup/' . getIPAddress() . '" target="_blank">' . getIPAddress() . '</a>',
'CUSTOM_IP_CHECK' => '<a href="https://www.abuseipdb.com/check/' . getIPAddress() . '" target="_blank">Abuse IP-Check</a>',
'CUSTOM_DATETIME' => date('d.m.Y - H:i:s'),
' ' => ' ',
) + $insert_array;
$content = '';
$content.= '<h3 style="padding-bottom:15px;">$_SERVER Array</h3>';
$content.= array2table( $insert );
if( !empty( $_GET ) ) {
$content.= '<h3 style="padding-bottom:15px;padding-top:30px;">$_GET Array</h3>';
$content.= array2table( $_GET );
}
if( !empty( $_POST ) ) {
$content.= '<h3 style="padding-bottom:15px;padding-top:30px;">$_POST Array</h3>';
$content.= array2table( $_POST );
}
$content.= '';
return $content;
}
function array2table( $array ) {
$content='';
if( !empty( $array ) && is_array( $array ) ) {
$content='<table>';
foreach( $array as $key => $value ) {
$content.='
<tr>
<td style="font-weight:bold;vertical-align:top;">' . $key . '</td>
<td>' . $value . '</td>
</tr>';
}
$content.='</table>';
}
return $content;
}
function sendEmail( $receiver, $subject, $content, $print = FALSE, $reply = FALSE ) {
$mailer = new PHPMailer(true);
$mailer->clearAddresses();
$mailer->clearAttachments();
$mailer->isSMTP();
$mailer->CharSet = "utf-8";
$mailer->Host = MAIL_SERVER;
$mailer->Port = MAIL_SERVER_PORT;
//$mailer->SMTPAutoTLS = true;
$mailer->SMTPAuth = true;
$mailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mailer->SMTPDebug = 0;
$mailer->Username = MAIL_USER;
$mailer->Password = MAIL_PASS;
/*$mailer->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
];*/
//$mailer->SMTPSecure = MAIL_SERVER_SECURE;
$mailer->setFrom( MAIL_SENDER, MAIL_SENDER_NAME );
$mailer->addAddress( $receiver );
//if( $reply !== FALSE ) $mailer->addReplyTo($reply['mail'], $reply['name']);
$mailer->Subject = $subject;
$mailer->IsHTML(true);
$mailer->Body = $content;
$mailer->AltBody = strip_tags( $content );
$mailer->send();
}
function getIPAddress() {
//whether ip is from the share internet
if( !empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
//whether ip is from the proxy
elseif ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
//whether ip is from the remote address
else{
$ip = $_SERVER['REMOTE_ADDR'];
}
return $ip;
}
function getFullUrl() {
return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
}
function curl_get_file_contents( $URL ) {
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $URL);
$contents = curl_exec($c);
curl_close($c);
if ($contents) return $contents;
else return FALSE;
}