OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
zzXpress
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
.browserslistrc
208 bytes
01/07/2025 11:52:51 AM
rw-r--r--
📄
.gitignore
42 bytes
01/07/2025 11:52:51 AM
rw-r--r--
📄
.htaccess
803 bytes
01/07/2025 11:52:51 AM
rw-r--r--
📄
.htaccess.swp
12 KB
01/07/2025 11:52:52 AM
rw-r--r--
📄
.travis.yml
199 bytes
01/07/2025 11:52:52 AM
rw-r--r--
📄
addList.php
5.23 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
aditya_navbar.php
23.72 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
allTemplates.php
5 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
assets
-
01/07/2025 11:50:15 AM
rwxr-xr-x
📄
b_navbar.php
7.84 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
bbsns_subscribe.php
5.14 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
bcreateList.php
9.61 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
blacklist.php
13.36 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
bounceViewList.php
8.39 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
bounce_handler.php
4.99 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
bprocess_emails.php
6.73 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
checkNotificationTopics.php
5.11 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
check_identity
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
checknotif.php
1.01 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
ckeditor.php
2.14 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
clickViewList.php
5.13 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
click_handler.php
1.75 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
combined.php
11.23 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
complaintsViewList.php
6.78 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
complaints_handler.php
2.89 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
composer.json
200 bytes
01/07/2025 11:52:56 AM
rw-r--r--
📄
composer.lock
39.12 KB
01/07/2025 11:52:56 AM
rw-r--r--
📄
createList.php
17.4 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
credentials
-
01/07/2025 11:52:11 AM
rwxr-xr-x
📄
csv.php
11.75 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
db.php
1000 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
deleteCampaign.php
966 bytes
05/19/2025 10:07:24 AM
rw-r--r--
📄
delete_list.php
509 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
delete_users.php
435 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
deliveryViewList.php
6.87 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
delivery_handler.php
3.25 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
download_Complaints.php
974 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
download_bounces.php
1.18 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
download_clicked.php
1.23 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
download_delivered.php
1.12 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
download_open.php
1.22 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
download_report.php
3.33 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
download_unique_open.php
1.6 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
duplicate_campaign.php
1.62 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
edit_campaign.php
1.45 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
edit_list.php
9.89 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
feedback.php
1.66 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
footer.php
1.7 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
grfx
-
01/07/2025 11:52:13 AM
rwxr-xr-x
📄
groupchatnavbar.php
607 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
himanshu_navbar.php
7.84 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
housekeeping.php
13.27 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
index.php
8.57 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
insert_list.php
2.64 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
js
-
01/07/2025 11:52:15 AM
rwxr-xr-x
📄
load.php
159 bytes
05/19/2025 10:07:24 AM
rw-r--r--
📁
log
-
01/07/2025 11:52:18 AM
rwxr-xr-x
📄
main.css
413 bytes
01/07/2025 11:53:01 AM
rw-r--r--
📄
navbar.php
23.77 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
newCompaign.php
11.12 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
openViewList.php
8.48 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
open_handler.php
1.75 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
process
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
process_emails.php
11.31 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
real-recipients.csv
39.48 KB
01/07/2025 11:53:03 AM
rw-r--r--
📄
resubscribe.php
5.51 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
sample.csv
55 bytes
01/07/2025 11:53:03 AM
rw-r--r--
📄
save.php
252 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
save_campaign.php
612 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
saved_content.html
6.48 KB
01/07/2025 11:53:03 AM
rw-r--r--
📄
send_email.php
987 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
send_email_campaignGraph.php
2.24 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
sendgrid.php
3.62 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
showListMembers.php
13.98 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
showcase.php
7.93 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
sidebar.php
0 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
sns_subscribe.php
5.25 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
submit_form.php
2.48 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
test-mail.csv
337 bytes
01/07/2025 11:53:05 AM
rw-r--r--
📄
test.php
969 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
test_process_emails.php
1.91 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
unsubscribe.php
3.8 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
upload_image.php
606 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📁
uploads
-
01/07/2025 11:52:34 AM
rwxr-xr-x
📁
vendor
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📄
verify.html
486 bytes
01/07/2025 11:53:06 AM
rw-r--r--
📄
verify.php
3.12 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
verify_email.php
5.12 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
viewCampaign.php
23.92 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
viewList.php
15.04 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
xpress_handler.php
9.79 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zcreateList.php
13.51 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
znewCompaign.php
8.29 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zprocess_emails.php
10.19 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
zviewList.php
14.63 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zzindex.php
10.24 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
zzviewCampaign.php
22.42 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zzviewList.php
14.63 KB
05/19/2025 10:07:22 AM
rw-r--r--
Editing: xpress_handler.php
Close
<?php ini_set('display_errors', 0); // Hide errors from displaying on the page ini_set('error_log', 'log/phperror.log'); // Set path for the log file include 'db.php'; // Include your database connection // include '../assets/php/db_config.php'; // Include your database connection $logFilePath = 'log/sns_emailLogs.log'; // Update this path as needed // Read and decode SNS message $snsMessage = file_get_contents('php://input'); $snsMessage = json_decode($snsMessage, true); file_put_contents($logFilePath, date('Y-m-d H:i:s') . " - Received message: " . print_r($snsMessage, true), FILE_APPEND); if (isset($snsMessage['Type']) && $snsMessage['Type'] === 'SubscriptionConfirmation') { // Confirm the subscription $subscriptionUrl = $snsMessage['SubscribeURL']; file_get_contents($subscriptionUrl); file_put_contents($logFilePath, date('Y-m-d H:i:s') . " - Subscription confirmed: " . print_r($response, true), FILE_APPEND); } elseif (isset($snsMessage['Type']) && $snsMessage['Type'] === 'Notification') { $message = json_decode($snsMessage['Message'], true); $eventType = $message['eventType'] ?? ''; $timestamp = date('Y-m-d H:i:s'); if ($eventType === "Click") { $fromEmail = $message['mail']['source'] ?? ''; $toEmail = $message['mail']['destination'][0] ?? ''; $messageId = $message['mail']['messageId'] ?? null; $stmt = $conn->prepare("INSERT INTO email_clicks (from_email, to_email, message_id, clicked_at) VALUES (?, ?, ?, ?)"); $stmt->bind_param("ssss", $fromEmail, $toEmail, $messageId, $timestamp); if ($stmt->execute() === FALSE) { file_put_contents($logFilePath, date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error, FILE_APPEND); } $stmt->close(); } elseif ($eventType === "Open") { $fromEmail = $message['mail']['source'] ?? ''; $toEmail = $message['mail']['destination'][0] ?? ''; $messageId = $message['mail']['messageId'] ?? null; $stmt = $conn->prepare("INSERT INTO email_opens (from_email, to_email, message_id, opened_at) VALUES (?, ?, ?, ?)"); $stmt->bind_param("ssss", $fromEmail, $toEmail, $messageId, $timestamp); if ($stmt->execute() === FALSE) { file_put_contents($logFilePath, date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error, FILE_APPEND); } $stmt->close(); } elseif ($eventType === "Send") { } elseif ($eventType === "Delivery") { $delivery = $message['delivery']; $deliveryRecipients = $delivery['recipients']; foreach ($deliveryRecipients as $recipient) { $sourceEmail = $message['mail']['source']; $emailAddress = $recipient; $messageId = $message['mail']['messageId']; $timestamp = $delivery['timestamp']; $remoteMtaIp = $delivery['remoteMtaIp'] ?? ''; foreach ($message['mail']['destination'] as $emailAddress) { // Save delivery information to your database saveDelivery($sourceEmail, $emailAddress, $messageId, $timestamp, $remoteMtaIp); } } } elseif ($eventType === "Bounce") { $bounce = $message['bounce']; $bouncedRecipients = $bounce['bouncedRecipients']; foreach ($bouncedRecipients as $recipient) { $sourceEmail = $message['mail']['source']; $emailAddress = $recipient['emailAddress']; $bounceType = $bounce['bounceType']; $bounceSubType = $bounce['bounceSubType']; $timestamp = $bounce['timestamp']; $feedbackId = $bounce['feedbackId']; $remoteMtaIp = $recipient['remoteMtaIp'] ?? ''; $diagnosticCode = $recipient['diagnosticCode'] ?? ''; $messageId = $message['mail']['messageId']; // Save bounce information to your database saveBounce($sourceEmail, $emailAddress, $bounceType, $bounceSubType, $timestamp, $feedbackId, $remoteMtaIp, $diagnosticCode, $messageId); add_suppression_list($emailAddress, $diagnosticCode); // deleteEmailFromAllLists($emailAddress); } } elseif ($eventType === "Complaints") { $complaint = $message['complaint']; $complainedRecipients = $complaint['complainedRecipients']; foreach ($complainedRecipients as $recipient) { $sourceEmail = $message['mail']['source']; $emailAddress = $recipient['emailAddress']; $complaintType = $complaint['complaintFeedbackType']; $timestamp = $complaint['timestamp']; $feedbackId = $complaint['feedbackId']; // Save complaint information to your database saveComplaint($sourceEmail, $emailAddress, $complaintType, $timestamp, $feedbackId); } } } // Function to save bounce information to the database using MySQLi function saveBounce($sourceEmail, $email, $type, $subType, $timestamp, $feedbackId, $remoteMtaIp, $diagnosticCode, $messageId) { global $conn; // Convert ISO 8601 timestamp to MySQL DATETIME format $dateTime = new DateTime($timestamp); $formattedTimestamp = $dateTime->format('Y-m-d H:i:s'); // Check connection if ($conn->connect_error) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database connection error: " . $conn->connect_error . "\n", FILE_APPEND); return; } // Prepare and bind $stmt = $conn->prepare("INSERT INTO bounces(from_email, email, bounce_type, bounce_sub_type, timestamp, feedback_id, remote_mta_ip, diagnostic_code, message_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->bind_param("sssssssss", $sourceEmail, $email, $type, $subType, $formattedTimestamp, $feedbackId, $remoteMtaIp, $diagnosticCode, $messageId); // Execute the statement if ($stmt->execute() === FALSE) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error . "\n", FILE_APPEND); } // Close the statement and connection $stmt->close(); $conn->close(); } function add_suppression_list($email, $reason) { global $conn; mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); try { $stmt = $conn->prepare("INSERT INTO suppression_list(email, reason) VALUES (?,?)"); $stmt->bind_param("ss", $email, $reason); if ($stmt->execute() === FALSE) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error . "\n", FILE_APPEND); } } catch (mysqli_sql_exception $e) { if ($e->getCode() == 1062) { // 1062 is the error code for duplicate entry http_response_code(409); // HTTP status code for conflict echo 'Duplicate entry detected'; file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database insert error: Duplicate entry detected" . "\n", FILE_APPEND); } else { // Other MySQL errors http_response_code(500); echo 'Failed to add to collection: ' . $e->getMessage(); file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database insert error: Failed to add to collection:" . $e->getMessage() . "\n", FILE_APPEND); } // Close the statement and connection $stmt->close(); $conn->close(); } } // Function to save delivery information to the database using MySQLi function saveDelivery($sourceEmail, $email, $messageId, $timestamp, $remoteMtaIp) { global $conn, $logFilePath; // Convert ISO 8601 timestamp to MySQL DATETIME format $dateTime = new DateTime($timestamp); $formattedTimestamp = $dateTime->format('Y-m-d H:i:s'); // Check connection if ($conn->connect_error) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database connection error: " . $conn->connect_error . "\n", FILE_APPEND); return; } // Prepare and bind $stmt = $conn->prepare("INSERT INTO deliveries(from_email, email, message_id, timestamp, remote_mta_ip) VALUES (?, ?, ?, ?, ?)"); $stmt->bind_param("sssss", $sourceEmail, $email, $messageId, $formattedTimestamp, $remoteMtaIp); // Execute the statement if ($stmt->execute() === FALSE) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error . "\n", FILE_APPEND); } // Close the statement and connection $stmt->close(); $conn->close(); file_put_contents($logFilePath, date('Y-m-d H:i:s') . "Email is Delivered adn inserted into database" , FILE_APPEND); } // Function to save complaint information to the database using MySQLi function saveComplaint($sourceEmail, $email, $type, $timestamp, $feedbackId) { global $conn; // Convert ISO 8601 timestamp to MySQL DATETIME format $dateTime = new DateTime($timestamp); $formattedTimestamp = $dateTime->format('Y-m-d H:i:s'); // Check connection if ($conn->connect_error) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database connection error: " . $conn->connect_error . "\n", FILE_APPEND); return; } // Prepare and bind $stmt = $conn->prepare("INSERT INTO complaints(from_email, email, complaint_type, timestamp, feedback_id) VALUES (?, ?, ?, ?, ?)"); $stmt->bind_param("sssss", $sourceEmail, $email, $type, $formattedTimestamp, $feedbackId); // Execute the statement if ($stmt->execute() === FALSE) { file_put_contents('log/xpress_error.log', date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error . "\n", FILE_APPEND); } // Close the statement and connection $stmt->close(); $conn->close(); }