-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
284 lines (250 loc) · 7.53 KB
/
index.html
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>No More Petting</title>
<meta name="description" content="A simple tool to check if your Discord server is being tracked by Spy.pet scraper bots.">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css">
<style>
body {
margin: 0;
padding: 0;
font-family: 'Inter', sans-serif;
background-color: #121212;
color: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
animation: fadeIn 0.5s ease;
}
.header {
margin-bottom: 20px;
text-align: center;
animation: slideInHeader 0.5s ease;
}
.header h1 {
margin: 0;
font-size: 1.5rem;
}
.github-link {
text-align: center;
margin-bottom: 20px;
animation: slideInHeader 0.5s ease;
}
.github-link a {
color: #4CAF50;
text-decoration: none;
transition: color 0.3s ease;
}
.github-link a:hover {
color: #45a049;
}
.form {
width: 500px; /* Widened the form */
padding: 20px;
background-color: #1e1e1e;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
animation: slideInForm 0.5s ease;
}
p {
margin-bottom: 15px;
}
input[type="text"] {
padding: 10px;
width: calc(100% - 20px); /* Widened the text box */
margin-bottom: 10px;
border: 1px solid #333333;
border-radius: 5px;
background-color: #333333;
color: #ffffff;
}
button {
padding: 10px 20px;
border: none;
border-radius: 5px;
background-color: #4CAF50;
color: #ffffff;
cursor: pointer;
transition: background-color 0.3s ease;
width: 100%;
box-sizing: border-box;
}
button:hover {
background-color: #45a049;
}
.result {
margin-top: 20px;
padding: 20px;
border-radius: 10px;
display: none;
}
.result-good {
background-color: #1b5a16;
}
.result-bad {
background-color: #5a1616;
}
.result-error {
background-color: #5a1616; /* Red background color */
}
.result i {
display: block;
margin-top: 10px;
font-size: 0.8rem;
}
.discord-button {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1000;
animation: fadeIn 0.5s ease;
}
.discord-button img {
width: 50px;
height: 50px;
border-radius: 50%;
cursor: pointer;
transition: transform 0.3s ease;
}
.discord-button img:hover {
transform: scale(1.1);
}
.owner-button {
position: fixed;
bottom: 20px;
left: 20px;
}
.owner-button img {
width: 50px;
height: 50px;
border-radius: 50%;
cursor: pointer;
transition: transform 0.3s ease;
}
.owner-button img:hover {
transform: scale(1.1);
}
@keyframes slideInHeader {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInForm {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<div class="header">
<h1>No More Petting!</h1>
</div>
<div class="github-link">
<a href="https://github.com/ixvqxx/NoMorePetting" target="_blank">View on GitHub</a>
</div>
<div class="form">
<p>Checks if server contains a data scraper bot, <a href="https://www.youtube.com/watch?v=ktxbXlF6UQE" target="_blank" rel="noopener noreferrer">more info</a>.</p>
<input type="text" placeholder="Enter Discord Server ID" id="serverId">
<button id="check-btn">Check</button>
<div class="result result-good" id="good-result">
<p>Everything is OK, Spy.pet is not tracking this server!</p>
<i>This service is powered by kickthespy.pet.</i>
</div>
<div class="result result-bad" id="bad-result">
<p>Everything is NOT ok, Spy.pet is tracking this server, using bot under name <strong id="botName"></strong>.</p>
<details>
<summary>More info</summary>
<div style="display: flex; gap: 0.5em;">
<img src="" alt="bot's pfp" title="Bot's Avatar" id="botAvatar" width="64" height="64">
<div>
<p>Bot's Username: <code id="botUsername"></code></p>
<p>Bot's ID: <code id="botId"></code></p>
<button id="ban-btn">Ban Member Command</button>
</div>
</div>
</details>
<i>This service is powered by kickthespy.pet.</i>
</div>
<div class="result result-error" id="error-result" style="display: none;">
<p>Invalid Discord Server ID format. Please enter a 18-digit server ID.</p>
</div>
</div>
<div class="discord-button">
<a href="https://discord.gg/iristf" target="_blank">
<img src="https://cdn.discordapp.com/emojis/941774804468498522.gif?size=96&quality=lossless" alt="Discord Icon">
</a>
</div>
<div class="owner-button">
<a href="https://guns.lol/.ovh" target="_blank">
<img src="https://cdn.discordapp.com/emojis/1206562614277050368.webp?size=96&quality=lossless" alt="Owner Icon">
</a>
</div>
<script>
const API_URL = "https://kickthespy.pet";
document.getElementById("check-btn").addEventListener("click", function (event) {
const serverId = document.getElementById("serverId").value;
// Regular expression to check if the ID is in the correct format
const idRegex = /^\d{18}$/;
if (!idRegex.test(serverId)) {
document.getElementById("error-result").style.display = "block";
document.getElementById("good-result").style.display = "none";
document.getElementById("bad-result").style.display = "none";
return;
} else {
document.getElementById("error-result").style.display = "none";
}
fetch(`${API_URL}/getBot?id=${serverId}`)
.then((response) => response.json())
.then((data) => {
if (data.id) {
document.getElementById("botName").innerText = data.global_name;
document.getElementById("botUsername").innerText = data.username;
document.getElementById("botId").innerText = data.id;
document.getElementById("botAvatar").setAttribute("src", data.avatarURL);
document.getElementById("good-result").style.display = "none";
document.getElementById("bad-result").style.display = "block";
} else {
document.getElementById("good-result").style.display = "block";
document.getElementById("bad-result").style.display = "none";
}
})
.catch((error) => console.error("Error:", error));
});
document.getElementById("ban-btn").addEventListener("click", function (event) {
const userId = document.getElementById("botId").innerText;
const command = `/ban <@${userId}>`;
navigator.clipboard.writeText(command)
.then(() => {
alert("Ban command copied to clipboard!");
})
.catch((error) => {
console.error("Error:", error);
alert("Failed to copy ban command to clipboard.");
});
});
</script>
</body>
</html>