forked from AvengeMedia/DankMaterialShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspam-notifications.sh
More file actions
executable file
·207 lines (190 loc) · 5.61 KB
/
spam-notifications.sh
File metadata and controls
executable file
·207 lines (190 loc) · 5.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#!/bin/bash
# Notification Spam Test Script - Sends 100 rapid notifications from fake apps
echo "NOTIFICATION SPAM TEST - 100 RAPID NOTIFICATIONS"
echo "============================================================="
echo "WARNING: This will send 100 notifications very quickly!"
echo "Press Ctrl+C to cancel, or wait 3 seconds to continue..."
sleep 3
# Arrays of fake app names and icons
APPS=(
"slack:mail-message-new"
"discord:internet-chat"
"teams:call-start"
"zoom:camera-video"
"spotify:audio-x-generic"
"chrome:web-browser"
"firefox:web-browser"
"vscode:text-editor"
"terminal:utilities-terminal"
"steam:applications-games"
"telegram:internet-chat"
"whatsapp:phone"
"signal:security-high"
"thunderbird:mail-client"
"calendar:office-calendar"
"notes:text-editor"
"todo:emblem-default"
"weather:weather-few-clouds"
"news:rss"
"reddit:web-browser"
"twitter:internet-web-browser"
"instagram:camera-photo"
"youtube:video-x-generic"
"netflix:media-playback-start"
"github:folder-development"
"gitlab:folder-development"
"jira:applications-office"
"notion:text-editor"
"obsidian:accessories-text-editor"
"dropbox:folder-remote"
"gdrive:folder-google-drive"
"onedrive:folder-cloud"
"backup:drive-harddisk"
"antivirus:security-high"
"vpn:network-vpn"
"torrent:network-server"
"docker:application-x-executable"
"kubernetes:applications-system"
"postgres:database"
"mongodb:database"
"redis:database"
"nginx:network-server"
"apache:network-server"
"jenkins:applications-development"
"gradle:applications-development"
"maven:applications-development"
"npm:package-x-generic"
"yarn:package-x-generic"
"pip:package-x-generic"
"apt:system-software-install"
)
# Arrays of message types
TITLES=(
"New message"
"Update available"
"Download complete"
"Task finished"
"Build successful"
"Deployment complete"
"Sync complete"
"Backup finished"
"Security alert"
"New notification"
"Process complete"
"Upload finished"
"Connection established"
"Meeting starting"
"Reminder"
"Warning"
"Error occurred"
"Success"
"Failed"
"Pending"
"In progress"
"Scheduled"
"New activity"
"Status update"
"Alert"
"Information"
"Breaking news"
"Hot update"
"Trending"
"New release"
)
MESSAGES=(
"Your request has been processed successfully"
"New content is available for download"
"Operation completed without errors"
"Check your inbox for updates"
"3 new items require your attention"
"Background task finished executing"
"All systems operational"
"Performance metrics updated"
"Configuration saved successfully"
"Database connection established"
"Cache cleared and rebuilt"
"Service restarted automatically"
"Logs have been rotated"
"Memory usage optimized"
"Network latency improved"
"Security scan completed - no threats"
"Automatic backup created"
"Files synchronized across devices"
"Updates installed successfully"
"New features are now available"
"Your subscription has been renewed"
"Report generated and ready"
"Analysis complete - view results"
"Queue processed: 42 items"
"Rate limit will reset in 5 minutes"
"API call successful (200 OK)"
"Webhook delivered successfully"
"Container started on port 8080"
"Build artifact uploaded"
"Test suite passed: 100/100"
"Coverage report: 95%"
"Dependencies updated to latest"
"Migration completed successfully"
"Index rebuilt for faster queries"
"SSL certificate renewed"
"Firewall rules updated"
"DNS propagation complete"
"CDN cache purged globally"
"Load balancer health check: OK"
"Cluster scaled to 5 nodes"
)
# Urgency levels
URGENCY=("low" "normal")
# Counter
COUNT=0
TOTAL=100
echo ""
echo "Starting notification spam..."
echo "------------------------------"
# Send notifications rapidly
for i in $(seq 1 $TOTAL); do
# Pick random app, title, message, and urgency
APP=${APPS[$RANDOM % ${#APPS[@]}]}
APP_NAME=${APP%%:*}
APP_ICON=${APP#*:}
TITLE=${TITLES[$RANDOM % ${#TITLES[@]}]}
MESSAGE=${MESSAGES[$RANDOM % ${#MESSAGES[@]}]}
URG=${URGENCY[$RANDOM % ${#URGENCY[@]}]}
# Add some variety with random numbers and timestamps
RAND_NUM=$((RANDOM % 1000))
TIMESTAMP=$(date +"%H:%M:%S")
# Randomly add extra details to some messages
if [ $((RANDOM % 3)) -eq 0 ]; then
MESSAGE="[$TIMESTAMP] $MESSAGE (#$RAND_NUM)"
fi
# Send notification with very short delay
notify-send \
-h string:desktop-entry:$APP_NAME \
-i $APP_ICON \
-u $URG \
"$APP_NAME: $TITLE" \
"$MESSAGE" &
# Increment counter
COUNT=$((COUNT + 1))
# Show progress every 10 notifications
if [ $((COUNT % 10)) -eq 0 ]; then
echo " Sent $COUNT/$TOTAL notifications..."
fi
# Tiny delay to prevent complete system freeze
# Adjust this value: smaller = faster spam, larger = slower spam
sleep 0.01
done
# Wait for all background notifications to complete
wait
echo ""
echo "Spam test complete!"
echo "============================================================="
echo "Statistics:"
echo " Total notifications sent: $TOTAL"
echo " Apps simulated: ${#APPS[@]}"
echo " Message variations: ${#MESSAGES[@]}"
echo " Time taken: ~$(($TOTAL / 100)) seconds"
echo ""
echo "Check your notification center - it should be FULL!"
echo "Tip: You may want to clear all notifications after this test"
echo ""