Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import base64, random, smtplib, time, re, getpass, os, string
- def check_isemail():
- global credentials
- if ".com" in credentials[0]:
- print("\n")
- else:
- print("Invalid email.")
- ask_login()
- def verify_user():
- global accepted_user
- global accepted_pass
- accepted_user = b"bWludGVk"
- accepted_pass = b"bWVudGhvbGFkbWlu"
- decoded_user = base64.b64decode(accepted_user.decode('utf-8'))
- decoded_pass = base64.b64decode(accepted_pass.decode('utf-8'))
- username = input("U: ")
- if username == decoded_user.decode('utf-8'):
- password = input("P: ")
- if password == decoded_pass.decode('utf-8'):
- print("\nLogin verified.\n")
- else:
- print("Wrong credentials, did you forget your credentials?")
- forgot = input("")
- if forgot == "yes":
- forgot_password()
- else:
- verify_user()
- def forgot_password():
- global accepted_user
- global accepted_pass
- numbers = "123456789(_+!&^%£"
- alphabet = "ABCEDFGHIJKLMNOPQRSTUVWXYZ"
- characters = alphabet + string.ascii_lowercase + numbers + string.ascii_uppercase
- rstring = "".join(random.choice(characters) for x in range(random.randint(9, 13)))
- filename = (str(rstring) + ".key")
- file = open(str(filename), "w+")
- file.write("User: " + accepted_user.decode('utf-8') + "\nPassword:" + accepted_pass.decode('utf-8') + "\n\nKey: Base64" + "\nDecode using: https://www.base64decode.org/")
- def show_info():
- version = 2.0
- print("mSpammer - by Nathan Townsend")
- print("The tool is currently running version:", str(version))
- def load_variables():
- global smtp_server
- global port
- global d1
- global d2
- smtp_server = 'smtp.gmail.com'
- port = 587
- d1 = 0.25
- d2 = 0.60
- def ask_login():
- global credentials
- print("\nFormat: 'americanjesus1929:slayer1'")
- ask_user = input("Enter credentials: ")
- credentials = ask_user.split(":")
- check_isemail()
- def hash_password():
- global credentials
- global hashed_pass
- hashed_pass = base64.b64encode(credentials[1].encode('utf-8'))
- hashed_pass = hashed_pass.decode('utf-8')
- def dehash_password():
- global hashed_pass
- global dehashed_pass
- dehashed_pass = base64.b64decode(hashed_pass)
- dehashed_pass = dehashed_pass.decode('utf-8')
- def send_email():
- # Retrieve SMTP details
- global smtp_server
- global port
- # Retrieve delays to bypass limit
- global d1
- global d2
- # Retrieve user data
- global credentials
- global dehashed_pass
- # Ask user for email data
- receiver = input('Receiver of spam: ')
- subject = input('Subject of email: ')
- body = input('Email body: ')
- amount = input("Amount to send: ")
- try:
- # Attempt connection to SMTP server + port
- server = smtplib.SMTP(smtp_server, port)
- server.ehlo()
- # Start connection and login to server
- server.starttls()
- server.login(credentials[0], dehashed_pass)
- print('Sending ' + str(amount) + ' emails to ' + receiver)
- for i in range(1, int(amount) + 1):
- message = 'From: ' + credentials[0] + '\nSubject: ' + subject + '\n' + body
- time.sleep(random.uniform(d1, d2))
- server.sendmail(credentials[0], receiver, message)
- print("[ID: " + str(i) + "]" + "\tEmail sent. ")
- else:
- print("\nFinished sending emails.")
- except smtplib.SMTPRecipientsRefused:
- print("Recipient refused. Invalid email address?")
- main()
- except smtplib.SMTPAuthenticationError:
- print("Unable to authenticate with server. Ensure the details are correct.")
- main()
- except smtplib.SMTPServerDisconnected:
- print("Server disconnected for an unknown reason.")
- main()
- except smtplib.SMTPConnectError:
- print("Unable to connect to server.")
- main()
- def main():
- verify_user()
- show_info()
- ask_login()
- hash_password()
- dehash_password()
- load_variables()
- send_email()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement