Sha256: bb1b9d0421e5fc6543ffac9728b9ec4beffab903fa3969c6e6afde92e75d3c1e

Contents?: true

Size: 1.71 KB

Versions: 14

Compression:

Stored size: 1.71 KB

Contents

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

get '/' do
    response.set_cookie( "cookie_input", {
        :value => "cookie_val",
        :secure   => true,
        :httponly => true
    })

    response.set_cookie( "cookie_input2", {
        :value => "cookie_val2",
        :httponly => false
    })
<<EOHTML
<html>
    <head>
        <meta http-equiv="Set-Cookie" content="http_equiv_cookie_name=http_equiv_cookie_val; secure; httponly">
    </head>
    <body>

        <a href="/link?link_input=link_val">Blah</a>

        <form method="post" action="/form" name="my_form">
            <p>
              <input type="text" name="form_input_1" value="form_val_1">
              <input type="text" name="form_input_2" value="form_val_2">
              <input type="submit">
            </p>
        </form>

        <form method="get" action="/form_2" name="my_form_2">
            <input type="text" name="form_2_input_1" value="form_2_val_1">

    </body>
</html>
EOHTML
end

get '/with_nonce' do
    <<HTML
    <form method="post" action="/form" name="my_form">
        <p>
            <input type="text" name="form_input_1" value="form_val_1">
            <input type="hidden" name="nonce" value="#{rand(999)}">
        </p>
    </form>

    <form method="post" action="/form" name="my_form2">
        <p>
            <input type="text" name="form_input_2" value="form_val_2">
            <input type="hidden" name="nonce2" value="#{rand(999)}">
        </p>
    </form>
HTML
end

get '/with_base' do
<<EOHTML
<html>
    <head>
        <base href="http://#{env['HTTP_HOST']}/this_is_the_base/" />
    </head>
    <body>
        <a href="link_with_base?link_input=link_val">Blah with base</a>
    </body>
</html>
EOHTML
end

Version data entries

14 entries across 14 versions & 1 rubygems

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