Sha256: 905792514ab8654e7ecec52ade372ddad45e9ef9a4576937bd232ce08f8cd006

Contents?: true

Size: 1.13 KB

Versions: 9

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

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

    context 'when there is an Server header' do
        described_class::IDs.each do |id|
            context "and it contains #{id}" do
                it 'identifies it as Windows' do
                    page = Arachni::Page.new(
                        url:     'http://stuff.com/blah',
                        response_headers: { 'Server' => "Apache/2.2.21 (#{id})" }
                    )
                    platforms_for( page ).should include :windows
                end
            end
        end
    end

    context 'when there is a X-Powered-By header' do
        described_class::IDs.each do |id|
            context "and it contains #{id}" do
                it 'identifies it as Windows' do
                    page = Arachni::Page.new(
                        url:     'http://stuff.com/blah',
                        response_headers: { 'X-Powered-By' => "PHP/5.0 (#{id})" }
                    )
                    platforms_for( page ).should include :windows
                end
            end
        end
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arachni-0.4.7 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.6 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.5.2 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.5.1 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.5 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.4 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.3.2 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.3.1 spec/fingerprinters/os/windows_spec.rb
arachni-0.4.3 spec/fingerprinters/os/windows_spec.rb