Sha256: 426ca0b48bc0e8c7ca6f098a17618e48c0875bfc66fa68d21eb08dd5bc97ee4e

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

=begin
    Copyright 2010-2022 Ecsypno <http://www.ecsypno.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

module Arachni
module Element::Capabilities
module WithScope

# Determines the {Scope scope} status of {Element::Base elements} based on
# their {Element::Base#action} and {Element::Base#type}.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class Scope < URI::Scope

    # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
    class Error < URI::Scope::Error
    end

    def initialize( element )
        @element = element
        super Arachni::URI( element.action )
    end

    # @note Will call {URI::Scope#redundant?}.
    #
    # @return   (see URI::Scope#out?)
    def out?
        begin
            return true if !Arachni::Options.audit.element?( @element.type )
        rescue Arachni::OptionGroups::Audit::Error::InvalidElementType
        end

        super || redundant?
    end

end

end
end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-1.6.1.3 lib/arachni/element/capabilities/with_scope/scope.rb
arachni-1.6.1.2 lib/arachni/element/capabilities/with_scope/scope.rb
arachni-1.6.1.1 lib/arachni/element/capabilities/with_scope/scope.rb
arachni-1.6.1 lib/arachni/element/capabilities/with_scope/scope.rb
arachni-1.6.0 lib/arachni/element/capabilities/with_scope/scope.rb