Sha256: 72bf613b9b085fde1d2040832a9d42e1686001e373c90e4f038318d6d4f65ba6

Contents?: true

Size: 1.94 KB

Versions: 13

Compression:

Stored size: 1.94 KB

Contents

require 'spec_helper'

describe Arachni::Platform::Fingerprinters::ASPX do
    include_examples 'fingerprinter'

    def platforms
        [:asp, :aspx, :windows]
    end

    context 'when the page has a .aspx extension' do
        it 'identifies it as ASPX' do
            check_platforms Arachni::Page.from_data( url: 'http://stuff.com/blah.aspx' )
        end
    end

    context 'when there is a session ID in the path' do
        it 'identifies it as ASPX' do
            check_platforms Arachni::Page.from_data(
                url:        'http://blah.com/(S(yn5cby55lgzstcen0ng2b4iq))/stuff'
            )
        end
    end

    context 'when there is a ASP.NET_SessionId cookie' do
        it 'identifies it as ASPX' do
            check_platforms Arachni::Page.from_data(
                url:     'http://stuff.com/blah',
                cookies: [Arachni::Cookie.new(
                              url:  'http://stuff.com/blah',
                              inputs: { 'ASP.NET_SessionId' => 'stuff' } )]

            )
        end
    end

    context 'when there is an X-Powered-By header' do
        it 'identifies it as ASPX' do
            check_platforms Arachni::Page.from_data(
                url:     'http://stuff.com/blah',
                response: { headers: { 'X-Powered-By' => 'ASP.NET'  } }
            )
        end
    end

    context 'when there is an X-AspNet-Version header' do
        it 'identifies it as ASPX' do
            check_platforms Arachni::Page.from_data(
                url:     'http://stuff.com/blah',
                response: { headers: { 'X-AspNet-Version' => '4.0.30319' } }

            )
        end
    end

    context 'when there is an X-AspNetMvc-Version header' do
        it 'identifies it as ASPX' do
            check_platforms Arachni::Page.from_data(
                url:     'http://stuff.com/blah',
                response: { headers: { 'X-AspNetMvc-Version' => '2.0' } }

            )
        end
    end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
arachni-1.6.1.3 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.6.1.2 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.6.1.1 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.6.1 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.6.0 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.5.1 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.5 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.4 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.3.2 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.3.1 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.3 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.2.1 spec/components/fingerprinters/languages/aspx_spec.rb
arachni-1.2 spec/components/fingerprinters/languages/aspx_spec.rb