Class: Arachni::BrowserCluster::Jobs::ResourceExploration
- Inherits:
-
Arachni::BrowserCluster::Job
- Object
- Arachni::BrowserCluster::Job
- Arachni::BrowserCluster::Jobs::ResourceExploration
- Defined in:
- lib/arachni/browser_cluster/jobs/resource_exploration.rb,
lib/arachni/browser_cluster/jobs/resource_exploration/result.rb,
lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb,
lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result.rb
Overview
Direct Known Subclasses
Defined Under Namespace
Classes: EventTrigger, Result
Instance Attribute Summary collapse
-
#resource ⇒ Page, ...
Resource to explore, if given a ‘String` it will be treated it as a URL and will be loaded.
Attributes inherited from Arachni::BrowserCluster::Job
Instance Method Summary collapse
- #clean_copy ⇒ Object
- #dup ⇒ Object
-
#initialize(options) ⇒ ResourceExploration
constructor
A new instance of ResourceExploration.
- #run ⇒ Object
- #to_s ⇒ Object
Methods inherited from Arachni::BrowserCluster::Job
#==, #configure_and_run, #forward, #forward_as, #hash, #id, #never_ending=, #never_ending?, #save_result
Constructor Details
#initialize(options) ⇒ ResourceExploration
Returns a new instance of ResourceExploration.
26 27 28 29 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration.rb', line 26 def initialize( ) self.resource = .delete(:resource) super end |
Instance Attribute Details
#resource ⇒ Page, ...
Returns Resource to explore, if given a ‘String` it will be treated it as a URL and will be loaded.
24 25 26 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration.rb', line 24 def resource @resource end |
Instance Method Details
#clean_copy ⇒ Object
52 53 54 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration.rb', line 52 def clean_copy super.tap { |j| j.resource = nil } end |
#dup ⇒ Object
48 49 50 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration.rb', line 48 def dup super.tap { |j| j.resource = resource } end |
#run ⇒ Object
32 33 34 35 36 37 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration.rb', line 32 def run browser.on_new_page { |page| save_result( page: page ) } browser.load resource browser.trigger_events end |
#to_s ⇒ Object
56 57 58 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration.rb', line 56 def to_s "#<#{self.class}:#{object_id} @resource=#{@resource}>" end |