Sha256: 276ff4da15793b3748b7c8856374ed32daf73a924b9fc6791ff212a100452462

Contents?: true

Size: 1.14 KB

Versions: 14

Compression:

Stored size: 1.14 KB

Contents

require 'sinatra'
require 'sinatra/contrib'
set :logging, false

def initial_elements
    cookies[:cookie1] = 'foo'
    <<HTML
    <a href='/?foo=bar'>Link</a>
    <form action="/">
        <input name='input1' />
    </form>
HTML
end

get '/' do
    initial_elements
end

get '/new-paths' do
    s = <<HTML
    <a href='/?foo=bar'>Link</a>
    <form action="/">
        <input name='input1' />
    </form>
HTML
    s + " #{request.env["REQUEST_URI"]}/stuff/here"
end

get '/non_text_content_type' do
    headers 'Content-Type' => "foo"
end

get '/new_form' do
    initial_elements + <<HTML
    <form>
        <input name='input2' />
    </form>
HTML
end

get '/new_link' do
    initial_elements + <<HTML
    <a href='?link_param=bar2'>Link</a>
HTML
end

get '/new_cookie' do
    cookies[:new_cookie] = 'hua!'
    initial_elements
end

get '/redirect' do
    ''
end

get '/elems' do
    <<-EOHTML
    <a href='/stuff'></a>
    EOHTML
end

get '/train/redirect' do
    redirect '/train/redirected?msg=blah'
end

get '/train/redirected' do
end

get '/fingerprint' do
    redirect '/fingerprint-this.php?stuff=here'
end

get '/fingerprint-this.php' do
    'Stuff'
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
arachni-1.6.1.3 spec/support/servers/arachni/trainer.rb
arachni-1.6.1.2 spec/support/servers/arachni/trainer.rb
arachni-1.6.1.1 spec/support/servers/arachni/trainer.rb
arachni-1.6.1 spec/support/servers/arachni/trainer.rb
arachni-1.6.0 spec/support/servers/arachni/trainer.rb
arachni-1.5.1 spec/support/servers/arachni/trainer.rb
arachni-1.5 spec/support/servers/arachni/trainer.rb
arachni-1.4 spec/support/servers/arachni/trainer.rb
arachni-1.3.2 spec/support/servers/arachni/trainer.rb
arachni-1.3.1 spec/support/servers/arachni/trainer.rb
arachni-1.3 spec/support/servers/arachni/trainer.rb
arachni-1.2.1 spec/support/servers/arachni/trainer.rb
arachni-1.2 spec/support/servers/arachni/trainer.rb
arachni-1.1 spec/support/servers/arachni/trainer.rb