Class: Arachni::Element::Capabilities::WithScope::Scope

Inherits:
URI::Scope show all
Defined in:
lib/arachni/element/capabilities/with_scope/scope.rb

Overview

Determines the scope status of elements based on their Base#action and Base#type.

Author:

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Methods inherited from URI::Scope

#auto_redundant?, #exclude?, #exclude_file_extension?, #follow_protocol?, #in?, #in_domain?, #include?, #redundant?, #too_deep?

Methods inherited from Scope

#options

Constructor Details

#initialize(element) ⇒ Scope

Returns a new instance of Scope.



23
24
25
26
# File 'lib/arachni/element/capabilities/with_scope/scope.rb', line 23

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

Instance Method Details

#out?Bool

Note:

Returns true if the URL out of the scan scope, false otherwise. The determination is based on:

Returns:



31
32
33
34
35
36
37
38
# File 'lib/arachni/element/capabilities/with_scope/scope.rb', line 31

def out?
    begin
        return true if !Arachni::Options.audit.element?( @element.type )
    rescue Arachni::OptionGroups::Audit::Error::InvalidElementType
    end

    super || redundant?
end