Sha256: 07a264f4441914eb1da55d6c596eb37f3164c8e2ea89997cf6c30143a8c15cee

Contents?: true

Size: 501 Bytes

Versions: 35

Compression:

Stored size: 501 Bytes

Contents

require 'sinatra'

def normal_response
    'Usual response...normal stuff'
end

def rejected
    'Piss off!'
end

def random
    (0..100).map{ rand( 9999 ).to_s }.join
end

@@request_cnt ||= 0

get '/positive' do
    params.to_s.include?( 'script' ) ? rejected : normal_response
end

get '/negative' do
    normal_response
end

get '/inconclusive' do
    @@request_cnt += 1

    if params.empty?
        normal_response
    else
        @@request_cnt % 2 == 0 ? rejected : normal_response
    end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
arachni-1.0 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.7 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.6 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.5.2 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.5.1 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.5 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.4 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.3.2 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.3.1 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.3 spec/support/servers/plugins/waf_detector.rb
arachni-0.4.2 spec/servers/plugins/waf_detector.rb
arachni-0.4.1.3 spec/servers/plugins/waf_detector.rb
arachni-0.4.1.2 spec/servers/plugins/waf_detector.rb
arachni-0.4.1.1 spec/servers/plugins/waf_detector.rb
arachni-0.4.1 spec/servers/plugins/waf_detector.rb