class Arachni::Browser::Javascript::TaintTracer::Frame
Represents a stack frame for a JS function call.
@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>
Attributes
function[RW]
@return [CalledFunction]
Relevant function.
line[RW]
@return [Integer, nil]
Line number related to the called frame.
url[RW]
@return [String, nil]
Location of the file associated with the called frame.
Public Class Methods
from_rpc_data( data )
click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/frame.rb, line 63 def self.from_rpc_data( data ) data['function'] = Frame::CalledFunction.from_rpc_data( data['function'] ) new data end
new( options = {} )
click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/frame.rb, line 33 def initialize( options = {} ) if options[:function].is_a? Hash @function = CalledFunction.new( options.delete(:function) ) end options.my_symbolize_keys(false).each do |k, v| send( "#{k}=", v ) end end
Public Instance Methods
==( other )
click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/frame.rb, line 55 def ==( other ) hash == other.hash end
hash()
click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/frame.rb, line 51 def hash to_h.hash end
to_h()
click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/frame.rb, line 43 def to_h instance_variables.inject({}) do |h, iv| h[iv.to_s.gsub('@', '').to_sym] = instance_variable_get( iv ) h end.merge( function: function.to_h ) end
Also aliased as: to_hash
to_rpc_data()
click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/frame.rb, line 59 def to_rpc_data to_h.merge( function: function.to_rpc_data ) end