class Arachni::Page::Scope

Determines the {Scope scope} status of {Page}s.

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Public Class Methods

new( page ) click to toggle source
Calls superclass method Arachni::HTTP::Response::Scope::new
# File lib/arachni/page/scope.rb, line 21
def initialize( page )
    # We're passing the page itself instead of the Page#response because we
    # want it to use the (possibly browser-evaluated) Page#body for content
    # scope checks.
    super page

    @page = page
end

Public Instance Methods

dom_depth_limit_reached?() click to toggle source

@return [Bool]

`true` if the {Page::DOM#depth} is greater than
{OptionGroups::Scope#dom_depth_limit} `false` otherwise.

@see OptionGroups::Scope#dom_depth_limit

# File lib/arachni/page/scope.rb, line 46
def dom_depth_limit_reached?
    options.dom_depth_limit && @page.dom.depth > options.dom_depth_limit
end
out?() click to toggle source

@note Also takes into account the {HTTP::Response::Scope} of the {Page#response}.

@return [Bool]

`true` if the {Page} is out of {OptionGroups::Scope scope},
`false`otherwise.

@see dom_depth_limit_reached?

Calls superclass method Arachni::HTTP::Response::Scope#out?
# File lib/arachni/page/scope.rb, line 37
def out?
    dom_depth_limit_reached? || super
end