Sha256: 19260385dc1b971022c4b9ec4f5d0405e12d05fec0d3d176b982a9eb5d56548c

Contents?: true

Size: 1.05 KB

Versions: 13

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

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

    def platforms
        [:python, :django]
    end

    context 'when there is a Server header' do
        it 'identifies it as Django' do
            check_platforms Arachni::Page.from_data(
                url: 'http://stuff.com/blah',
                response: { headers: { 'Server' => 'WSGIServer/0.1mt Django/2.7.4' } }
            )
        end
    end

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

    context 'when there are X-Django headers' do
        it 'identifies it as Django' do
            check_platforms Arachni::Page.from_data(
                url: 'http://stuff.com/blah',
                response: { headers: { 'X-Django-Stuff' => 'Blah' } }
            )
        end
    end

end

Version data entries

13 entries across 13 versions & 1 rubygems

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