Sha256: ca9694e4fd42a6d03bc342697290ea39a092a27eee7b91a6545e7c4e8bae3fad

Contents?: true

Size: 1.06 KB

Versions: 13

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

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

    def platforms
        [:tomcat, :java]
    end

    context 'when there is an Server header' do
        it 'identifies it as Tomcat' do
            check_platforms Arachni::Page.from_data(
                url:     'http://stuff.com/blah',
                response: { headers: { 'Server' => 'Tomcat/2.2.21' } }
            )
        end
    end

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

    context 'when there is an Server header' do
        it 'identifies it as Tomcat' do
            check_platforms Arachni::Page.from_data(
                url:     'http://stuff.com/blah',
                response: { headers:  { 'Server' => 'Apache-Coyote/1.1' } }
            )
        end
    end

end

Version data entries

13 entries across 13 versions & 1 rubygems

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