ronin-rb / ronin-code-sql

A Ruby DSL for crafting SQL Injections
https://ronin-rb.dev
GNU Lesser General Public License v3.0
44 stars 5 forks source link

Add a `comment:` keyword argument to `Emitter#initialize` #17

Closed postmodern closed 1 year ago

postmodern commented 1 year ago

It should be possible to override the SQL comment token using a comment: keyword argument.

sqli = Ronin::Code::SQL::Injection.new
sqli.or { 1 == 1 }
sqli.to_sql(comment: '-- x')
# => "1 OR 1=1-- x"

Emitter#mit_comment should respect comment: if given. (See #15)

postmodern commented 1 year ago

Implemented by f6c017cfe44bd3817642aae2302321a953e9a4cf.