module Arachni::Element::DOM::Capabilities::Auditable
@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>
Public Class Methods
audit_handle_submit( browser, options )
click to toggle source
# File lib/arachni/element/dom/capabilities/auditable.rb, line 45 def self.audit_handle_submit( browser, options ) Submittable.prepare_browser( browser, options ) page = Submittable.submit_with_browser( browser, options ) # Failed to submit. return if !page Auditable.handle_submission_result page end
audit_handle_submit_cb()
click to toggle source
# File lib/arachni/element/dom/capabilities/auditable.rb, line 54 def self.audit_handle_submit_cb @audit_handle_submit_cb ||= Auditable.method(:audit_handle_submit) end
handle_submission_result( page )
click to toggle source
# File lib/arachni/element/dom/capabilities/auditable.rb, line 29 def self.handle_submission_result( page ) # In case of redirection or runtime scope changes. return if !page.parsed_url.seed_in_host? && page.scope.out? element = page.request.performer if !element.audit_options[:silent] element.print_status "Analyzing response ##{page.request.id} for " << "#{element.type} input '#{element.affected_input_name}'" << " pointing to: '#{element.audit_status_message_action}'" end Arachni::Utilities.exception_jail false do element.auditor.check_and_log( page, element ) end end
Public Instance Methods
submit_and_process( &block )
click to toggle source
Calls superclass method
Arachni::Element::Capabilities::Auditable#submit_and_process
# File lib/arachni/element/dom/capabilities/auditable.rb, line 17 def submit_and_process( &block ) # If we're operating under the context of a check switch to class-level # method callbacks to avoid registering multiple unique callbacks # for the browser jobs, thus avoiding all the context that comes with # closures. if @auditor.class.respond_to? :check_and_log submit( @audit_options[:submit] || {}, Auditable.audit_handle_submit_cb ) else super( &block ) end end
with_browser( *args, &block )
click to toggle source
# File lib/arachni/element/dom/capabilities/auditable.rb, line 58 def with_browser( *args, &block ) auditor.with_browser( *args, &block ) end
with_browser_cluster( &block )
click to toggle source
# File lib/arachni/element/dom/capabilities/auditable.rb, line 62 def with_browser_cluster( &block ) auditor.with_browser_cluster( &block ) end