Skip to content

Instantly share code, notes, and snippets.

@rmrhz
Created December 17, 2014 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmrhz/ad9b93ac954b17d3ceea to your computer and use it in GitHub Desktop.
Save rmrhz/ad9b93ac954b17d3ceea to your computer and use it in GitHub Desktop.
Spams a certain URL with an 'effin parameter
require 'curb'
x = 500
i = 0
while x > i do
# Creates a random string
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
string = (0...10).map { o[rand(o.length)] }.join
http = Curl.post('http://example.com/controller/action', {:foo => string}) do |http|
http.headers['X-Requested-With'] = 'XMLHttpRequest'
end
i = i + 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment