-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
237 lines (201 loc) · 7.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>فحص ايميلات انستكرام</title>
<style>
:root {
--background-light: #f4f4f4;
--background-dark: #121212;
--text-light: #000;
--text-dark: #fff;
--primary: #4CAF50;
--error: #FF6347;
}
body.light {
background-color: var(--background-light);
color: var(--text-light);
}
body.dark {
background-color: var(--background-dark);
color: var(--text-dark);
}
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}
.container {
text-align: center;
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
width: 90%;
max-width: 600px;
}
body.dark .container {
background-color: var(--background-dark);
box-shadow: none;
}
.button {
background-color: var(--primary);
border: none;
color: white;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border-radius: 5px;
margin: 10px;
transition: background-color 0.3s, transform 0.3s;
}
.button:hover {
background-color: #45a049;
}
.progress {
width: 100%;
background-color: #ddd;
border-radius: 5px;
overflow: hidden;
margin: 20px 0;
height: 20px;
}
.progress-bar {
height: 100%;
width: 0%;
background-color: var(--primary);
text-align: center;
color: white;
line-height: 20px;
transition: width 0.3s;
}
.result {
font-size: 14px;
margin-top: 20px;
font-weight: bold;
white-space: pre-wrap;
}
.success {
color: green;
}
.error {
color: var(--error);
}
.tabs {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.tab {
margin: 0 10px;
cursor: pointer;
padding: 10px 20px;
border-radius: 5px;
background-color: var(--primary);
color: white;
}
.tab.active {
background-color: #45a049;
}
.hidden {
display: none;
}
</style>
<script>
function toggleTheme() {
const body = document.body;
body.classList.toggle("dark");
body.classList.toggle("light");
}
function isValidEmail(email) {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(email);
}
async function checkEmail(email) {
const url = "https://i.instagram.com/api/v1/users/check_email/";
const headers = {
'User-Agent': "Instagram 166.0.0.30.120 Android (30/11; 1440dpi; 2560x1440; samsung; SM-G973F; x86_64; tablet; en_US; kirin)",
'Content-Type': "application/x-www-form-urlencoded; charset=UTF-8"
};
const body = new URLSearchParams({ email });
try {
const response = await fetch(url, {
method: 'POST',
headers: headers,
body: body
});
const data = await response.text();
return data.includes('email_is_taken') ? "GOOD" : "BAD";
} catch (error) {
console.error("خطأ:", error);
return "ERROR";
}
}
async function processComboFile(event) {
const file = event.target.files[0];
if (!file) return;
const startTime = Date.now();
const reader = new FileReader();
reader.onload = async function(e) {
const content = e.target.result;
const lines = content.split(/\r?\n/);
const validEmails = lines.filter(line => isValidEmail(line.trim()));
const progressBar = document.getElementById("progress-bar");
const goodTab = document.getElementById("good-tab");
const badTab = document.getElementById("bad-tab");
const messageElement = document.getElementById("message");
goodTab.innerHTML = "";
badTab.innerHTML = "";
progressBar.style.width = "0%";
messageElement.innerText = "";
let currentIndex = 0;
for (const email of validEmails) {
const result = await checkEmail(email.trim());
currentIndex++;
if (result === "GOOD") {
goodTab.innerHTML += `<div class="success">[GOOD] ${email}</div>`;
} else if (result === "BAD") {
badTab.innerHTML += `<div class="error">[BAD] ${email}</div>`;
} else {
badTab.innerHTML += `<div class="error">[ERROR] ${email}</div>`;
}
progressBar.style.width = `${(currentIndex / validEmails.length) * 100}%`;
}
const endTime = Date.now();
const timeTaken = ((endTime - startTime) / 1000).toFixed(2);
messageElement.innerText = `تم الانتهاء! الوقت المستغرق: ${timeTaken} ثانية.`;
};
reader.readAsText(file);
}
function showTab(tabName) {
document.getElementById("good-tab").classList.add("hidden");
document.getElementById("bad-tab").classList.add("hidden");
document.getElementById(tabName).classList.remove("hidden");
document.getElementById("good-button").classList.remove("active");
document.getElementById("bad-button").classList.remove("active");
document.getElementById(`${tabName}-button`).classList.add("active");
}
</script>
</head>
<body class="light">
<div class="container">
<h1>فحص ايميلات انستكرام</h1>
<button class="button" onclick="toggleTheme()">تبديل الوضع</button>
<input type="file" accept=".txt" onchange="processComboFile(event)">
<div class="progress">
<div id="progress-bar" class="progress-bar"></div>
</div>
<div class="tabs">
<div id="good-button" class="tab active" onclick="showTab('good-tab')">الإيميلات الجيدة</div>
<div id="bad-button" class="tab" onclick="showTab('bad-tab')">الإيميلات السيئة</div>
</div>
<div id="good-tab"></div>
<div id="bad-tab" class="hidden"></div>
<div id="message"></div>
</div>
</body>
</html>