Sha256: af6eaa347802e0d4afc71246d93e8b84ea1ad42361dcc9ccc5ce261e43387eef

Contents?: true

Size: 1.06 KB

Versions: 11

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'plugin'

    before( :all ) do
        options.plugins[name] = {
            'username_list'  => fixtures_path + 'usernames.txt',
            'password_list'  => fixtures_path + 'passwords.txt',
        }
    end

    def results
        results_for( name_from_filename )
    end

    context 'when given the right params' do
        it 'logins successfully' do
            options.url = web_server_url_for( name_from_filename )
            run
            expect(results).to eq({ 'username' => 'admin', 'password' => 'pass' })
        end
    end

    context 'when being unable to login' do
        it 'logs nothing' do
            options.url = web_server_url_for( "#{name_from_filename}_secure" )
            run
            expect(results).to be_nil
        end
    end

    context "when the page isn't protected" do
        it 'logs nothing' do
            options.url = web_server_url_for( "#{name_from_filename}_unprotected" )
            run
            expect(results).to be_nil
        end
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
arachni-1.6.1.3 spec/components/plugins/http_dicattack_spec.rb
arachni-1.6.1.2 spec/components/plugins/http_dicattack_spec.rb
arachni-1.6.1.1 spec/components/plugins/http_dicattack_spec.rb
arachni-1.6.1 spec/components/plugins/http_dicattack_spec.rb
arachni-1.6.0 spec/components/plugins/http_dicattack_spec.rb
arachni-1.5.1 spec/components/plugins/http_dicattack_spec.rb
arachni-1.5 spec/components/plugins/http_dicattack_spec.rb
arachni-1.4 spec/components/plugins/http_dicattack_spec.rb
arachni-1.3.2 spec/components/plugins/http_dicattack_spec.rb
arachni-1.3.1 spec/components/plugins/http_dicattack_spec.rb
arachni-1.3 spec/components/plugins/http_dicattack_spec.rb