class Arachni::Element::DOM
@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>
Attributes
action[R]
browser[RW]
@return [Browser]
parent[RW]
@return [Element::Base]
Public Class Methods
decode( string )
click to toggle source
# File lib/arachni/element/dom.rb, line 110 def self.decode( string ) string end
encode( string )
click to toggle source
# File lib/arachni/element/dom.rb, line 106 def self.encode( string ) string end
new( options )
click to toggle source
# File lib/arachni/element/dom.rb, line 30 def initialize( options ) options = options.dup @parent = options.delete(:parent) if parent @url = parent.url.dup.freeze if parent.url @action = parent.action.dup.freeze if parent.action @page = parent.page if parent.page @source = parent.source.dup.freeze if parent.respond_to?(:source) && parent.source else @url = options[:url].freeze @action = options[:action].freeze @page = options[:page] @source = options[:source].freeze end @audit_options = {} end
Public Instance Methods
action=(*)
click to toggle source
# File lib/arachni/element/dom.rb, line 53 def action=(*) # NOP end
decode( string )
click to toggle source
# File lib/arachni/element/dom.rb, line 102 def decode( string ) self.class.decode( string ) end
dup()
click to toggle source
Calls superclass method
Arachni::Element::Capabilities::WithSource#dup
# File lib/arachni/element/dom.rb, line 81 def dup super.tap { |new| new.parent = parent } end
encode( string )
click to toggle source
# File lib/arachni/element/dom.rb, line 98 def encode( string ) self.class.encode( string ) end
initialization_options()
click to toggle source
# File lib/arachni/element/dom.rb, line 89 def initialization_options options = {} options[:url] = @url.dup if @url options[:action] = @action.dup if @action # options[:page] = @page if @page options[:source] = @source.dup if @source options end
marshal_dump()
click to toggle source
Calls superclass method
Arachni::Element::Base#marshal_dump
# File lib/arachni/element/dom.rb, line 85 def marshal_dump super.reject{ |k, _| [:@parent, :@page, :@browser, :@element].include? k } end
page()
click to toggle source
# File lib/arachni/element/dom.rb, line 57 def page return @page if @page @page = parent.page if parent end
prepare_for_report()
click to toggle source
Removes the associated {#page}, {#parent} and {#browser}
Calls superclass method
Arachni::Element::Base#prepare_for_report
# File lib/arachni/element/dom.rb, line 72 def prepare_for_report super @page = nil @parent = nil @element = nil @browser = nil end
trigger()
click to toggle source
Triggers the event on the subject {#element}.
@return [Array<Page::DOM::Transition>]
@abstract
# File lib/arachni/element/dom.rb, line 67 def trigger fail NotImplementedError end
url=(*)
click to toggle source
# File lib/arachni/element/dom.rb, line 49 def url=(*) # NOP end