Sha256: 8e339fd99310c16eb5d21e8b8cf6dbc5dba78c859e057dd06a1b5fd0f588a673

Contents?: true

Size: 969 Bytes

Versions: 7

Compression:

Stored size: 969 Bytes

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 '/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

7 entries across 7 versions & 1 rubygems

Version Path
arachni-1.0.6 spec/support/servers/arachni/trainer.rb
arachni-1.0.5 spec/support/servers/arachni/trainer.rb
arachni-1.0.4 spec/support/servers/arachni/trainer.rb
arachni-1.0.3 spec/support/servers/arachni/trainer.rb
arachni-1.0.2 spec/support/servers/arachni/trainer.rb
arachni-1.0.1 spec/support/servers/arachni/trainer.rb
arachni-1.0 spec/support/servers/arachni/trainer.rb