ronin-code-sql 2.1.0 has been released!

New Features

The Ronin::Code::SQLI constant alias was added:

sqli = Ronin::Code::SQLI.new
sqli.or { 1 == 1 }
puts sqli
# 1 OR 1=1

The [Ronin::Code::SQL::Mixin] module was added that can add the sql and sqli methods to any class.

require 'ronin/code/sql/mixin'

class MyClass
  include Ronin::Code::SQL::Mixin

  def build_sqli
    sqli.or { 1 == 1 }
  end
end

Thanks to our newest contributor, @lena64t, ronin-code-sql received two new features:

Generating SQL injection with custom comments:

sqli = Ronin::Code::SQLI.new
sqli.or { 1 == 1 }
puts sqli.to_sql(terminate: true, comment: '#')
# 1 OR 1=1 OR 1=1;#

Added support for the ORDER BY clause:

sqli = Ronin::Code::SQLI.new
sqli.or { 1 == 1 }.order_by(10)
puts sqli
# 1 OR 1=1 ORDER BY (10)

Updating

To update ronin-code-sql, simply run:

sudo gem update ronin-code-sql

The docker images have also been updated. To update the docker images, simply run:

docker pull roninrb/ronin
If Ronin interests you or you like the work we do, consider donating to Ronin on GitHub, Patreon, or Open Collective so we can continue building high-quality free and Open Source security tools and Ruby libraries.