Sha256: eac522b992c5e67ba4d396bafe5c007ccf73da96bc499f46f7d19933403003ed
Contents?: true
Size: 1.38 KB
Versions: 2
Compression:
Stored size: 1.38 KB
Contents
=begin Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.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 class BrowserCluster module Jobs # Loads a {#resource} and {Browser#trigger_events explores} its DOM. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class ResourceExploration < Job require_relative 'resource_exploration/result' require_relative 'resource_exploration/event_trigger' # @return [Page, String, HTTP::Response] # Resource to explore, if given a `String` it will be treated it as a URL # and will be loaded. attr_accessor :resource def initialize( options ) self.resource = options.delete(:resource) super options end # Loads a {#resource} and {Browser#trigger_events explores} its DOM. def run browser.on_new_page { |page| save_result( page: page ) } browser.load resource browser.trigger_events end def dup super.tap { |j| j.resource = resource } end def clean_copy super.tap { |j| j.resource = nil } end def to_s "#<#{self.class}:#{object_id} @resource=#{@resource}>" end alias :inspect :to_s end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
arachni-1.2.1 | lib/arachni/browser_cluster/jobs/resource_exploration.rb |
arachni-1.2 | lib/arachni/browser_cluster/jobs/resource_exploration.rb |