OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress_backup
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/06/2025 07:58:55 AM
rw-r--r--
π
.gitignore
42 bytes
01/06/2025 07:58:55 AM
rw-r--r--
π
.htaccess
803 bytes
01/06/2025 07:58:55 AM
rw-r--r--
π
.htaccess.swp
12 KB
01/06/2025 07:58:56 AM
rw-r--r--
π
.travis.yml
199 bytes
01/06/2025 07:58:56 AM
rw-r--r--
π
09-01-25navbar.php
23.78 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
15-02-25viewList.php
15.21 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
17-02-25newCompaign.php
13.09 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
NLEditor
-
05/19/2025 10:07:19 AM
rwxr-xr-x
π
addList.php
5.65 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
adi_deliveryViewList.php
11.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
aditya_choose.php
6.13 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
aditya_viewCampaign.php
25.53 KB
05/19/2025 10:07:19 AM
rwxrwxrwx
π
assets
-
01/06/2025 08:00:13 AM
rwxr-xr-x
π
back_choose_template.php
8.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
blacklist.php
13.47 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
bounceViewList.php
13.28 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
bounce_handler.php
5.05 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
checkNotificationTopics.php
5.11 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
check_identity
-
05/19/2025 10:07:17 AM
rwxr-xr-x
π
checknotif.php
1.01 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
choose_template.php
9.73 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
clickViewList.php
11.72 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
click_handler.php
1.75 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
complaintsViewList.php
7.43 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
complaints_handler.php
2.89 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
composer.json
200 bytes
01/06/2025 07:59:01 AM
rw-r--r--
π
composer.lock
39.12 KB
01/06/2025 07:59:01 AM
rw-r--r--
π
createList.php
17.48 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
credentials
-
01/06/2025 08:01:45 AM
rwxr-xr-x
π
csv.php
11.8 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
data
-
03/03/2025 11:56:59 AM
rwxrwxrwx
π
db.php
1000 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
deleteCampaign.php
966 bytes
05/19/2025 10:07:19 AM
rw-r--r--
π
delete_list.php
903 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
delete_users.php
435 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
deliveryViewList.php
11.45 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
delivery_handler.php
3.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
download_Complaints.php
1.16 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
download_bounces.php
1.18 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
download_clicked.php
1.23 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
download_delivered.php
1.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
download_open.php
1.22 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
download_report.php
3.33 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
download_unique_open.php
1.6 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
duplicate_campaign.php
1.62 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
edit_campaign.php
1.45 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
edit_list.php
9.99 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
feedback.php
1.66 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
fetch_template.php
493 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
footer.php
1.7 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
grfx
-
01/06/2025 08:01:47 AM
rwxrwxrwx
π
himanshu_index.php
6.66 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
himanshu_newCompaign.php
11.92 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
housekeeping.php
23.07 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
index.php
7.95 KB
05/19/2025 10:07:17 AM
rwxrwxrwx
π
insert_list.php
2.64 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
js
-
01/06/2025 08:01:49 AM
rwxr-xr-x
π
load.php
159 bytes
05/19/2025 10:07:19 AM
rw-r--r--
π
log
-
01/07/2025 07:47:04 AM
rwxrwxrwx
π
main.css
1.32 KB
01/09/2025 10:38:27 AM
rw-r--r--
π
navbar.php
22.64 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
navbar_menu.php
1.65 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
newCompaign.php
14.61 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
obc_cards.php
8.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
openViewList.php
13.25 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
open_handler.php
1.75 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
process
-
05/19/2025 10:07:17 AM
rwxrwxrwx
π
process_emails.php
11.96 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
real-recipients.csv
39.48 KB
01/06/2025 07:59:07 AM
rw-r--r--
π
resubscribe.php
5.61 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
sample.csv
55 bytes
01/06/2025 07:59:08 AM
rw-r--r--
π
save.php
252 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
save_campaign.php
612 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
saved_content.html
6.48 KB
01/07/2025 11:02:10 AM
rw-r--r--
π
send_email.php
987 bytes
05/19/2025 10:07:17 AM
rwxrwxrwx
π
send_email_campaignGraph.php
2.24 KB
05/19/2025 10:07:19 AM
rwxrwxrwx
π
sendgrid.php
3.62 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
showListMembers.php
10.69 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
showcase.php
7.93 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
sidebar.php
0 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
sns_subscribe.php
5.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
submit_form.php
2.48 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
template_index.php
7.37 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
test-mail.csv
337 bytes
01/06/2025 07:59:10 AM
rw-r--r--
π
test.php
969 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
test_process_emails.php
1.91 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
unsubscribe.php
7.63 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
upload_image.php
606 bytes
05/19/2025 10:07:17 AM
rw-r--r--
π
uploads
-
03/03/2025 01:00:59 PM
rwxrwxrwx
π
vendor
-
05/19/2025 10:07:19 AM
rwxr-xr-x
π
verify.html
486 bytes
01/06/2025 07:59:11 AM
rw-r--r--
π
verify.php
3.12 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
verify_email.php
5.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
viewCampaign.php
25.37 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
viewList.php
16.51 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
xpress_handler.php
10.38 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
znewCompaign.php
11.22 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
zunsubscribe.php
6.02 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
zzindex.php
6.89 KB
05/19/2025 10:07:19 AM
rw-r--r--
π
zzzzindex.php
6.76 KB
05/19/2025 10:07:17 AM
rw-r--r--
π
zzzzzindex.php
6.88 KB
05/19/2025 10:07:19 AM
rw-r--r--
Editing: sns_subscribe.php
Close
<?php // Define the path to the log file $logFilePath = 'log/sns_bounces.log'; // Update this path as needed // Capture the raw POST data $postData = file_get_contents('php://input'); $message = json_decode($postData, true); // $jsonData = json_encode($message, JSON_PRETTY_PRINT); // // Define the path for the JSON file // $filePath = 'log/data.json'; // // Write the JSON data to the file (creating it if it doesnβt exist) // file_put_contents($filePath, $jsonData); // Log the incoming message for debugging file_put_contents($logFilePath, date('Y-m-d H:i:s') . " - Received message: " . print_r($message, true), FILE_APPEND); // Verify the message type if (isset($message['Type'])) { if ($message['Type'] === 'SubscriptionConfirmation') { // Handle subscription confirmation $subscribeUrl = $message['SubscribeURL']; $response = file_get_contents($subscribeUrl); file_put_contents($logFilePath, date('Y-m-d H:i:s') . " - Subscription confirmed: " . print_r($response, true), FILE_APPEND); } elseif ($message['Type'] === 'Notification') { $notification = json_decode($message['Message'], true); // Handle bounce notification if (isset($notification['notificationType']) && $notification['notificationType'] === 'Bounce') { $bounce = $notification['bounce']; $bouncedRecipients = $bounce['bouncedRecipients']; foreach ($bouncedRecipients as $recipient) { $sourceEmail = $notification['mail']['source']; $emailAddress = $recipient['emailAddress']; $bounceType = $bounce['bounceType']; $bounceSubType = $bounce['bounceSubType']; $timestamp = $bounce['timestamp']; $feedbackId = $bounce['feedbackId']; $remoteMtaIp = $recipient['remoteMtaIp'] ?? ''; $diagnosticCode = $recipient['diagnosticCode'] ?? ''; $messageId = $notification['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); } } } } // Respond with 200 OK http_response_code(200); // Function to save bounce information to the database using MySQLi function saveBounce($sourceEmail, $email, $type, $subType, $timestamp, $feedbackId, $remoteMtaIp, $diagnosticCode, $messageId) { include 'db.php'; // 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/sns_bounces.log', date('Y-m-d H:i:s') . " - Database connection error: " . $conn->connect_error, 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/sns_bounces.log', date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error, FILE_APPEND); } // Close the statement and connection $stmt->close(); $conn->close(); } function add_suppression_list($email, $reason) { include 'db.php'; 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/sns_bounces.log', date('Y-m-d H:i:s') . " - Database insert error: " . $stmt->error, 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/sns_bounces.log', date('Y-m-d H:i:s') . " - Database insert error: Duplicate entry detected", FILE_APPEND); } else { // Other MySQL errors http_response_code(500); echo 'Failed to add to collection: ' . $e->getMessage(); file_put_contents('log/sns_bounces.log', date('Y-m-d H:i:s') . " - Database insert error: Failed to add to collection:" . $e->getMessage(), FILE_APPEND); } // Close the statement and connection $stmt->close(); $conn->close(); } } // function deleteEmailFromAllLists($email){ // include 'db.php'; // $stmt = $conn->prepare("DELETE FROM subscribers WHERE email = ?"); // $stmt->bind_param("s",$email); // $stmt->execute(); // $stmt->close(); // $conn->close(); // } ?>