OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
aws-ses
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/04/2025 08:32:49 AM
rwxr-xr-x
📄
.browserslistrc
208 bytes
03/03/2025 08:18:13 AM
rw-r--r--
📄
.gitignore
42 bytes
03/03/2025 08:18:13 AM
rw-r--r--
📄
.htaccess
803 bytes
03/03/2025 08:18:13 AM
rw-r--r--
📄
.htaccess.swp
12 KB
03/03/2025 08:18:13 AM
rw-r--r--
📄
.travis.yml
199 bytes
03/03/2025 08:18:13 AM
rw-r--r--
📄
addList.php
4.7 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
allTemplates.php
5 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bbsns_subscribe.php
5.14 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
bcreateList.php
9.61 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
blacklist.php
14.07 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bounceViewList.php
7.62 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bounce_handler.php
5 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
bprocess_emails.php
6.73 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
checkNotificationTopics.php
5.11 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
check_identity
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
checknotif.php
1.01 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
ckeditor.php
2.14 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
click_handler.php
1.75 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
combined.php
11.23 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
complaintsViewList.php
6.8 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
complaints_handler.php
2.89 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
composer.json
200 bytes
03/03/2025 08:18:13 AM
rw-r--r--
📄
composer.lock
39.12 KB
03/03/2025 08:18:13 AM
rw-r--r--
📄
createList.php
11.23 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
credentials
-
03/03/2025 08:19:01 AM
rwxr-xr-x
📄
csv.php
10.1 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
db.php
1000 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
delete_list.php
509 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
delete_users.php
435 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
deliveryViewList.php
6.6 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
delivery_handler.php
3.25 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
download_Complaints.php
974 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
download_bounces.php
1007 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
download_delivered.php
971 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
download_unique_open.php
1.6 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
edit_list.php
9.95 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
feedback.php
1.66 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
footer.php
4.2 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
groupchatnavbar.php
607 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
housekeeping.php
10.6 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
index.php
8.12 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
insert_list.php
2.64 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
log
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
navbar.php
1.63 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
newCompaign.php
7.59 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
new_table.php
13.36 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
open_handler.php
1.75 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
process
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
process_emails.php
10.36 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
real-recipients.csv
39.48 KB
03/03/2025 08:18:13 AM
rw-r--r--
📄
resubscribe.php
5.38 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
sample.csv
55 bytes
03/03/2025 08:18:13 AM
rw-r--r--
📄
send_email.php
987 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
send_email_campaignGraph.php
2.24 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
sendgrid.php
3.62 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
showListMembers.php
12.38 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
showcase.php
7.93 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
sidebar.php
3.12 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
sns_subscribe.php
5.25 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
submit_form.php
2.48 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
test-mail.csv
337 bytes
03/03/2025 08:18:14 AM
rw-r--r--
📄
test.php
969 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
test_process_emails.php
1.91 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
unsubscribe.php
3.36 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
upload_image.php
606 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📁
uploads
-
03/03/2025 08:19:12 AM
rwxr-xr-x
📁
vendor
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
verify.html
486 bytes
03/03/2025 08:18:14 AM
rw-r--r--
📄
verify.php
3.12 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
verify_email.php
5.12 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
viewCampaign.php
13.05 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
viewList.php
9.76 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
zprocess_emails.php
10.21 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zshowListMembers.php
4.54 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
zsidebar.php
3.27 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zviewCampaign.php
8.94 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zzedit_list.php
8.36 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zzprocess_emails.php
10.07 KB
05/19/2025 10:07:15 AM
rw-r--r--
Editing: checkNotificationTopics.php
Close
<?php require 'vendor/autoload.php'; use Aws\Ses\SesClient; use Aws\Exception\AwsException; // AWS SDK configuration $sesClient = new SesClient([ 'version' => 'latest', 'region' => 'ap-south-1', // Change to your region 'credentials' => [ 'key' => 'AKIARWSGL3TOIAEQEUPU', 'secret' => 'VKBuTv7PPkWniUQLdXajzm+8h8jX+KBUtFZW4m6N', ], ]); function setAllNotification($sesClient){ $list = $sesClient->listIdentities(); foreach ($list['Identities'] as $email){ checkNotifiTopic($sesClient, $email); } } function checkNotifiTopic($sesClient, $userEmail) { $requiredBounceTopicArn = 'arn:aws:sns:ap-south-1:117185436892:CreamBounces'; $requiredDeliveryTopicArn = 'arn:aws:sns:ap-south-1:117185436892:CreamDelivery'; $requiredComplaintTopicArn = 'arn:aws:sns:ap-south-1:117185436892:CreamComplaints'; try { $attributesResult = $sesClient->getIdentityNotificationAttributes([ 'Identities' => [$userEmail] ]); // $attributes = $attributesResult->get('NotificationAttributes')[$userEmail]; // Check if the key exists before accessing it if (isset($attributesResult->get('NotificationAttributes')[$userEmail])) { $attributes = $attributesResult->get('NotificationAttributes')[$userEmail]; } else { // Throw an exception if $userEmail is not found throw new Exception("Email '$userEmail' not found in NotificationAttributes"); } $bounceTopic = $attributes['BounceTopic'] ?? 'Not Set'; $deliveryTopic = $attributes['DeliveryTopic'] ?? 'Not Set'; $complaintTopic = $attributes['ComplaintTopic'] ?? 'Not Set'; $isBounceCorrect = $bounceTopic === $requiredBounceTopicArn; $isDeliveryCorrect = $deliveryTopic === $requiredDeliveryTopicArn; $isComplaintCorrect = $complaintTopic === $requiredComplaintTopicArn; if (!$isBounceCorrect || !$isDeliveryCorrect || !$isComplaintCorrect) { $retryCount = 0; $maxRetries = 5; $backoffTime = 1; // Start with 1 second do { try { // Set bounce topic if incorrect if (!$isBounceCorrect) { $sesClient->setIdentityNotificationTopic([ 'Identity' => $userEmail, 'NotificationType' => 'Bounce', 'SnsTopic' => $requiredBounceTopicArn, ]); echo "Set Bounce Topic for identity: $userEmail<br>"; } // Set delivery topic if incorrect if (!$isDeliveryCorrect) { $sesClient->setIdentityNotificationTopic([ 'Identity' => $userEmail, 'NotificationType' => 'Delivery', 'SnsTopic' => $requiredDeliveryTopicArn, ]); echo "Set Delivery Topic for identity: $userEmail<br>"; } // Set complaint topic if incorrect if (!$isComplaintCorrect) { $sesClient->setIdentityNotificationTopic([ 'Identity' => $userEmail, 'NotificationType' => 'Complaint', 'SnsTopic' => $requiredComplaintTopicArn, ]); echo "Set Complaint Topic for identity: $userEmail<br>"; } // If the request was successful, break out of the loop break; } catch (AwsException $e) { if ($e->getAwsErrorCode() === 'Throttling' && $retryCount < $maxRetries) { // If throttling error, wait and retry sleep($backoffTime); $backoffTime *= 2; // Exponential backoff $retryCount++; } else { // For other errors, or if max retries reached, throw the exception throw $e; } } } while ($retryCount < $maxRetries); } else { echo "SNS topics are correctly set for identity: $userEmail<br>"; } sleep(1); } catch (AwsException $e) { echo "Your email $userEmail is not verified. <a href='verify.html'>Please verify your email..</a><br>"; } catch (Exception $e) { // echo "Your email $userEmail is not verified. <a href='verify.html'>Please verify your email..</a><br>"; echo $e; } } if (isset($_POST['check_email'])) { $checkEmail = $_POST['check_email']; checkNotifiTopic($sesClient, $checkEmail); } else { echo "Email is not fetched"; } // Create a program for the admin only to set all the notification topics to the desired one if (isset($_POST['set_all_email'])){ setAllNotification($sesClient); } ?>