Skip to content

Instantly share code, notes, and snippets.

@ssig33
Created September 27, 2011 10:25
Show Gist options
  • Save ssig33/1244773 to your computer and use it in GitHub Desktop.
Save ssig33/1244773 to your computer and use it in GitHub Desktop.
require "mechanize"
alice = Mechanize.new
list = []
%w{a b c d e f g h i j k l m n o p q l s t u v w x y z 1 2 3 4 5 6 7 8 9 0}.each{|x|
%w{a b c d e f g h i j k l m n o p q l s t u v w x y z 1 2 3 4 5 6 7 8 9 0}.each{|y|
%w{a b c d e f g h i j k l m n o p q l s t u v w x y z 1 2 3 4 5 6 7 8 9 0}.each{|z|
list << x+y+z
}
}
}
p list
list.each{|d|
begin
page = alice.get "http://delicious.com/register"
form = page.forms[1]
form.username = d
form.password = "kogaidan"
form.email = "#{d}@ssig33.com"
page = alice.submit form
puts d if page.uri.to_s != "http://delicious.com/register"
rescue
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment