-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRun.py
523 lines (504 loc) · 24.6 KB
/
Run.py
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
try:
import random, string, os, sys, names, time, requests, json
from rich.console import Console
from rich.panel import Panel
from mimesis.locales import Locale
from faker import Faker
from mimesis import Person
from rich import print as printf
from randomuser import RandomUser
except (ModuleNotFoundError) as e:
__import__("sys").exit(f"[Error] {str(e).capitalize()}!")
LIVE, LOOPING, DIE, UNKNOWN = [], 0, [], []
class FITUR:
def __init__(self) -> None:
pass
def UTAMA(self):
try:
self.TAMPILKAN_LOGO()
printf(
Panel(
f"""[bold green]01[bold white]. Create Email from Random String
[bold green]02[bold white]. Create Email from Mimesis
[bold green]03[bold white]. Create Email from Faker
[bold green]04[bold white]. Create Email from Names
[bold green]05[bold white]. Create Email from RandomUser
[bold green]06[bold white]. Valid Email Checker
[bold green]07[bold white]. Keluar ([bold red]Exit[bold white])""",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Fitur Utama] <",
subtitle="[bold bright_black]╭───────",
subtitle_align="left",
)
)
CHOOSE = Console().input("[bold bright_black] ╰─> ")
if CHOOSE in ["1", "2", "3", "4", "5", "01", "02", "03", "04", "05"]:
printf(
Panel(
f"[bold white]Please fill in the domain, you are free to use any domain, for example:[bold green] @gmail.com[bold white]\n*make sure you only fill in one domain, no more!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Domain] <",
subtitle="[bold bright_black]╭───────",
subtitle_align="left",
)
)
self.DOMAIN = Console().input("[bold bright_black] ╰─> ")
if "@" in str(self.DOMAIN) and "." in str(self.DOMAIN):
printf(
Panel(
f"[bold white]Please fill in the desired amount to dump emails, make sure the amount is more than 100, for\nexample:[bold green] 1000[bold white] *[bold red]remember to only fill in numbers[bold white]!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Jumlah Email] <",
subtitle="[bold bright_black]╭───────",
subtitle_align="left",
)
)
self.COUNT = int(Console().input("[bold bright_black] ╰─> "))
if self.COUNT >= 100:
printf(
Panel(
f"[bold white]Creating fake email, please wait a moment and you can use[bold green] CTRL + C[bold white] to stop, do not use[bold red] CTRL + Z[bold white],\nif an error occurs please check the response log!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Catatan] <",
)
)
self.FILE_NAME = EMAILS().GENERATE_RANDOM_FILENAME()
if CHOOSE in ["1", "01"]:
self.STATUS = EMAILS().RANDOM_STRING(
self.DOMAIN, self.COUNT, self.FILE_NAME, 10
)
elif CHOOSE in ["2", "02"]:
self.STATUS = EMAILS().MIMESIS(
self.DOMAIN, self.COUNT, self.FILE_NAME
)
elif CHOOSE in ["3", "03"]:
self.STATUS = EMAILS().FAKER(
self.DOMAIN, self.COUNT, self.FILE_NAME
)
elif CHOOSE in ["4", "04"]:
self.STATUS = EMAILS().NAMES(
self.DOMAIN, self.COUNT, self.FILE_NAME
)
else:
self.STATUS = EMAILS().RANDOM_USER(
self.DOMAIN, self.COUNT, self.FILE_NAME
)
if bool(self.STATUS) == True:
printf(
Panel(
f"[bold white]Successfully created a fake email and we managed to save it in[bold green] {self.FILE_NAME}",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Sukses] <",
)
)
sys.exit()
else:
printf(
Panel(
f"[bold red]Failed to create fake email, please try again and make sure there is a Temporary folder!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Gagal] <",
)
)
sys.exit()
else:
printf(
Panel(
f"[bold red]You entered too few numbers, please fill in at least more than 100 emails for optimal results!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Jumlah Salah] <",
)
)
sys.exit()
elif CHOOSE in ["6", "06"]:
printf(
Panel(
f"[bold white]You must fill in the name of the file you want to check whether the email is valid or not, for example:[bold green] Temporary/Example.txt[bold white] *make sure the file is available!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Nama File] <",
subtitle="[bold bright_black]╭───────",
subtitle_align="left",
)
)
self.FILE_NAME = Console().input("[bold bright_black] ╰─> ")
if os.path.exists(self.FILE_NAME) == True:
if len(open(self.FILE_NAME, "r").readlines()) >= 1:
self.SAVE_FILES = str(
EMAILS().GENERATE_RANDOM_FILENAME()
).replace(".txt", "")
self.FILE_LIVE, self.FILE_DIE = (
f"{self.SAVE_FILES}_Live.txt",
f"{self.SAVE_FILES}_Die.txt",
)
printf(
Panel(
f"[bold white]You can wait for a few minutes, if there is an error, the service is probably not working properly.\nWe recommend registering with Gmail to make it work!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Catatan] <",
)
)
for EMAIL in open(self.FILE_NAME, "r").read().splitlines():
try:
CHECKER().EMAIL(
[f"{EMAIL}"], self.FILE_LIVE, self.FILE_DIE
)
except (KeyboardInterrupt):
printf(
f"\r ",
end="\r",
)
break
printf(
Panel(
f"[bold white]Congratulations, you have successfully obtained[bold green] {len(LIVE)}[bold white] live emails and[bold red] {len(DIE)}[bold white] dead emails, all results have been saved in[bold yellow] {self.FILE_LIVE}[bold white] and[bold yellow] {self.FILE_DIE}[bold white]!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Selesai] <",
)
)
sys.exit()
else:
printf(
Panel(
f"[bold red]The file you entered is empty, please use another file and make sure it contains an email list!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [File Kosong] <",
)
)
sys.exit()
else:
printf(
Panel(
f"[bold red]The file name you entered is not available, please try again and fill in the file name correctly!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [File Tidak Ada] <",
)
)
sys.exit()
elif CHOOSE in ["7", "07"]:
printf(
Panel(
f"[bold white]You have selected the exit option, thank you for using this program, hope you enjoy it!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Keluar] <",
)
)
sys.exit()
else:
printf(
Panel(
f"[bold red]The option you selected is not in the features, please try again and see the features list!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Pilihan Salah] <",
)
)
time.sleep(4.5)
self.UTAMA()
except (Exception) as e:
printf(
Panel(
f"[bold red]{str(e).capitalize()}!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Error] <",
)
)
sys.exit()
def TAMPILKAN_LOGO(self):
os.system("cls" if os.name == "nt" else "clear")
printf(
Panel(
r"""[bold red] ______ _ __ __ _ _
| ____| | | | \/ | (_) |
| |__ __ _| | _____ | \ / | __ _ _| | ___ _ __
| __/ _` | |/ / _ \ | |\/| |/ _` | | |/ _ \ '__|
| | | (_| | < __/ | | | | (_| | | | __/ |
[bold white]|_| \__,_|_|\_\___| |_| |_|\__,_|_|_|\___|_|
[underline green]Fake Email Generator - by Rozhak""",
style="bold bright_black",
width=59,
)
)
return False
class CHECKER:
def __init__(self) -> None:
pass
def EMAIL(self, email, file_live, file_die):
global LIVE, DIE, UNKNOWN, LOOPING
try:
for EMAIL in email:
if "@" in EMAIL and "." in EMAIL:
with requests.Session() as session:
session.headers.update(
{
"Accept-Language": "en-US,en;q=0.9",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Dest": "empty",
"Host": "ychecker.com",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
}
)
params = {
"email": f"{EMAIL}",
}
response = session.get(
"https://ychecker.com/app/payload?",
params=params,
allow_redirects=True,
)
if '"items":' in str(response.text):
self.JSON_ITEMS = json.loads(response.text)["items"]
session.headers.update(
{
"Sec-Fetch-Site": "cross-site",
"Origin": "https://ychecker.com",
"Host": "app.sonjj.com",
}
)
params = {
"payload": f"{self.JSON_ITEMS}",
}
response2 = session.get(
"https://app.sonjj.com/v1/check_email/?",
params=params,
allow_redirects=True,
)
if '"status":"Ok"' in str(response2.text):
try:
self.DISPOSABLE, self.TYPE = (
json.loads(response2.text)["disposable"],
json.loads(response2.text)["type"],
)
except (Exception):
self.DISPOSABLE, self.TYPE = ("null", "null")
printf(
Panel(
f"""[bold white]Disposable :[bold green] {str(self.DISPOSABLE).capitalize()}
[bold white]Email :[bold red] {EMAIL}
[bold white]Type :[bold yellow] {str(self.TYPE).upper()}""",
style="bold bright_black",
width=59,
title="[bold bright_black][bold bright_black]> [[bold green]Live[bold bright_black]] <",
)
)
LIVE.append(f"{EMAIL}")
open(file_live, "a+").write(f"{EMAIL}\n")
break
elif '"status":"NotExist"' in str(response2.text):
try:
self.DISPOSABLE, self.TYPE = (
json.loads(response2.text)["disposable"],
json.loads(response2.text)["type"],
)
except (Exception):
self.DISPOSABLE, self.TYPE = ("null", "null")
printf(
Panel(
f"""[bold white]Disposable :[bold green] {str(self.DISPOSABLE).capitalize()}
[bold white]Email :[bold red] {EMAIL}
[bold white]Type :[bold yellow] {str(self.TYPE).upper()}""",
style="bold bright_black",
width=59,
title="[bold bright_black][bold bright_black]> [[bold red]Die[bold bright_black]] <",
)
)
DIE.append(f"{EMAIL}")
open(file_die, "a+").write(f"{EMAIL}\n")
break
elif "Invalid credentials" in str(response2.text):
printf(
f"[bold bright_black] ──>[bold yellow] TURN ON AIRPLANE MODE FOR ONE SECOND!",
end="\r",
)
time.sleep(7.5)
else:
UNKNOWN.append(f"{EMAIL}")
continue
else:
UNKNOWN.append(f"{EMAIL}")
continue
else:
UNKNOWN.append(f"{EMAIL}")
continue
LOOPING += 1
printf(
f"[bold bright_black] ──>[bold green] @{str(EMAIL).split('@')[0].upper()}[bold white]/[bold blue]{LOOPING}[bold white] LIVE:-[bold green]{len(LIVE)}[bold white] DIE:-[bold red]{len(DIE)}[bold white] BAD:-[bold yellow]{len(UNKNOWN)}[bold white] ",
end="\r",
)
except (requests.exceptions.RequestException):
printf(
f"[bold bright_black] ──>[bold red] YOUR CONNECTION HAS BEEN DISCONNECTED!",
end="\r",
)
time.sleep(10.0)
except (Exception) as e:
printf(f"[bold bright_black] ──>[bold red] {str(e).upper()}!", end="\r")
time.sleep(5.5)
class EMAILS:
def __init__(self) -> None:
pass
def RANDOM_STRING(self, domain, count, file_name, length):
try:
for _ in range(int(count)):
self.USERNAME = "".join(
random.choices(string.ascii_lowercase + string.digits, k=length)
)
self.EMAIL = f"{self.USERNAME}{domain}"
open(f"{file_name}", "a+").write(f"{self.EMAIL}\n")
printf(
f"[bold bright_black] ──>[bold white] DUMP[bold green] {self.EMAIL}[bold white]/[bold green]{len(open(file_name, 'r').readlines())}[bold white] EMAIL! ",
end="\r",
)
time.sleep(0.007)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
except (KeyboardInterrupt):
printf(
f"[bold bright_black] ──>[bold red] DUMP HAS STOPPED! ",
end="\r",
)
time.sleep(3.5)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
def MIMESIS(self, domain, count, file_name):
try:
for _ in range(int(count)):
self.PERSON = Person(Locale.EN)
self.EMAIL = self.PERSON.email(domains=[f"{domain}"])
open(f"{file_name}", "a+").write(f"{self.EMAIL}\n")
printf(
f"[bold bright_black] ──>[bold white] DUMP[bold green] {self.EMAIL}[bold white]/[bold green]{len(open(file_name, 'r').readlines())}[bold white] EMAIL! ",
end="\r",
)
time.sleep(0.007)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
except (KeyboardInterrupt):
printf(
f"[bold bright_black] ──>[bold red] DUMP HAS STOPPED! ",
end="\r",
)
time.sleep(3.5)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
def FAKER(self, domain, count, file_name):
try:
for _ in range(int(count)):
self.FAKE = Faker("id_ID")
self.EMAIL = self.FAKE.email(domain=domain.replace("@", ""))
open(f"{file_name}", "a+").write(f"{self.EMAIL}\n")
printf(
f"[bold bright_black] ──>[bold white] DUMP[bold green] {self.EMAIL}[bold white]/[bold green]{len(open(file_name, 'r').readlines())}[bold white] EMAIL! ",
end="\r",
)
time.sleep(0.007)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
except (KeyboardInterrupt):
printf(
f"[bold bright_black] ──>[bold red] DUMP HAS STOPPED! ",
end="\r",
)
time.sleep(3.5)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
def NAMES(self, domain, count, file_name):
try:
for _ in range(int(count)):
self.GENDER = random.choice(["male", "female"])
self.FIRST_NAME = names.get_first_name(gender=self.GENDER).lower()
self.LAST_NAME = names.get_last_name().lower()
self.EMAIL = f"{self.FIRST_NAME}.{self.LAST_NAME}{domain}"
open(f"{file_name}", "a+").write(f"{self.EMAIL}\n")
printf(
f"[bold bright_black] ──>[bold white] DUMP[bold green] {self.EMAIL}[bold white]/[bold green]{len(open(file_name, 'r').readlines())}[bold white] EMAIL! ",
end="\r",
)
time.sleep(0.007)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
except (KeyboardInterrupt):
printf(
f"[bold bright_black] ──>[bold red] DUMP HAS STOPPED! ",
end="\r",
)
time.sleep(3.5)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
def RANDOM_USER(self, domain, count, file_name):
try:
for _ in range(int(count)):
self.USER = RandomUser()
self.EMAIL = str(self.USER.get_email()).replace("@example.com", domain)
open(f"{file_name}", "a+").write(f"{self.EMAIL}\n")
printf(
f"[bold bright_black] ──>[bold white] DUMP[bold green] {self.EMAIL}[bold white]/[bold green]{len(open(file_name, 'r').readlines())}[bold white] EMAIL! ",
end="\r",
)
time.sleep(0.007)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
except (KeyboardInterrupt):
printf(
f"[bold bright_black] ──>[bold red] DUMP HAS STOPPED! ",
end="\r",
)
time.sleep(3.5)
if len(open(file_name, "r").readlines()) == 0:
return False
else:
return True
def GENERATE_RANDOM_FILENAME(self, length=9, extension=".txt"):
self.RANDOM_FILE_NAME = f"{''.join(random.choices(string.ascii_lowercase + string.digits, k=length))}{extension}"
with open(f"Temporary/{self.RANDOM_FILE_NAME}", "w") as W:
W.write("")
W.close()
return f"Temporary/{self.RANDOM_FILE_NAME}"
if __name__ == "__main__":
try:
os.system("git pull")
FITUR().UTAMA()
except (Exception) as e:
printf(
Panel(
f"[bold red]{str(e).capitalize()}!",
style="bold bright_black",
width=59,
title="[bold bright_black]> [Error] <",
)
)
sys.exit()
except (KeyboardInterrupt):
sys.exit()