rails g refinery:engine project title:string description:text
bundle install
rails generate refinery:projects
rake db:migrate
rake db:seed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept exploit for Rails SQL Injection (CVE-2013-0156) | |
# | |
# ## Advisory | |
# | |
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion | |
# | |
# ## Caveats | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str = "111222333" * 1000000 | |
a = Time.now | |
str.scan(/(0+|1+|2+|3+|4+|5+|6+|7+|8+|9+)/).map { |i| "#{i[0].size}#{i[0][0]}" }.join | |
puts Time.now - a | |
a = Time.now | |
str.scan(/((\d)\2*)/).map { |i| "#{i[0].size}#{i[1]}"}.join | |
puts Time.now - a |
NewerOlder