Class: Arachni::Page::Scope
- Inherits:
-
HTTP::Response::Scope
- Object
- Scope
- URI::Scope
- HTTP::Message::Scope
- HTTP::Response::Scope
- Arachni::Page::Scope
- Defined in:
- lib/arachni/page/scope.rb
Overview
Determines the scope status of Arachni::Pages.
Defined Under Namespace
Classes: Error
Instance Method Summary collapse
-
#dom_depth_limit_reached? ⇒ Bool
true
if the DOM#depth is greater than OptionGroups::Scope#dom_depth_limitfalse
otherwise. -
#initialize(page) ⇒ Scope
constructor
A new instance of Scope.
-
#out? ⇒ Bool
true
if the Arachni::Page is out of scope,false
otherwise.
Methods inherited from HTTP::Response::Scope
#exclude_as_binary?, #exclude_content?
Methods inherited from URI::Scope
#auto_redundant?, #exclude?, #exclude_file_extension?, #follow_protocol?, #in?, #in_domain?, #include?, #redundant?, #too_deep?
Methods inherited from Scope
Constructor Details
#initialize(page) ⇒ Scope
Returns a new instance of Scope.
21 22 23 24 25 26 27 28 |
# 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 |
Instance Method Details
#dom_depth_limit_reached? ⇒ Bool
Returns true
if the DOM#depth is greater than
OptionGroups::Scope#dom_depth_limit false
otherwise.
46 47 48 |
# File 'lib/arachni/page/scope.rb', line 46 def dom_depth_limit_reached? .dom_depth_limit && @page.dom.depth > .dom_depth_limit end |
#out? ⇒ Bool
Note:
Also takes into account the HTTP::Response::Scope of the Arachni::Page#response.
Returns true
if the Arachni::Page is out of scope,
false
otherwise.
37 38 39 |
# File 'lib/arachni/page/scope.rb', line 37 def out? dom_depth_limit_reached? || super end |