Sha256: c3c413cdd2fd259e46e7d3ccf43ac79c5c741dcd6182d2f0c03fa5094f190186

Contents?: true

Size: 932 Bytes

Versions: 8

Compression:

Stored size: 932 Bytes

Contents

require 'spec_helper'

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

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

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

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
arachni-1.1 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0.6 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0.5 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0.4 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0.3 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0.2 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0.1 spec/components/fingerprinters/servers/tomcat_spec.rb
arachni-1.0 spec/components/fingerprinters/servers/tomcat_spec.rb