Sha256: dee6d660d22e6b423c41f1b29bff8c449cb2bef86e7c32ded19b9806e9748963

Contents?: true

Size: 1.1 KB

Versions: 8

Compression:

Stored size: 1.1 KB

Contents

require 'sinatra'
require 'sinatra/contrib'

def default
    'default'
end

def get_result( str )
    str = str.to_s

    if str.end_with?( '1=2' ) || str == '-1'
        'Could not find any results, bugger off!'
    elsif str.end_with?( '1=1' ) || str == default
        '1 item found: Blah blah blah...'
    else
        'No idea what you want mate...'
    end
end

get '/' do
    <<-EOHTML
        <a href="/link?input=default">Link</a>
        <a href="/form">Form</a>
        <a href="/cookie">Cookie</a>
        <a href="/header">Header</a>
    EOHTML
end

get '/link' do
    <<-EOHTML
        <a href="/link/append?input=default">Link</a>
    EOHTML
end

get '/link/append' do
    get_result( params['input'] )
end

get '/form' do
    <<-EOHTML
        <form action="/form/append">
            <input name='input' value='default' />
        </form>
    EOHTML
end

get '/form/append' do
    get_result( params['input'] )
end


get '/cookie' do
    <<-EOHTML
        <a href="/cookie/append">Cookie</a>
    EOHTML
end

get '/cookie/append' do
    cookies['cookie'] ||= default
    get_result( cookies['cookie'] )
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
arachni-1.0.5 spec/support/servers/checks/active/sql_injection_differential.rb
arachni-1.0.4 spec/support/servers/checks/active/sql_injection_differential.rb
arachni-1.0.3 spec/support/servers/checks/active/sql_injection_differential.rb
arachni-1.0.2 spec/support/servers/checks/active/sql_injection_differential.rb
arachni-1.0.1 spec/support/servers/checks/active/sql_injection_differential.rb
arachni-1.0 spec/support/servers/checks/active/sql_injection_differential.rb
arachni-0.4.7 spec/support/servers/modules/audit/sqli_blind_rdiff.rb
arachni-0.4.6 spec/support/servers/modules/audit/sqli_blind_rdiff.rb