Skip to content

Instantly share code, notes, and snippets.

@rmrhz
Created Dec 17, 2014
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