Skip to content

Instantly share code, notes, and snippets.

@rmrhz
Created December 17, 2014 09:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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