Class: Arachni::Browser::Javascript::TaintTracer::Frame
- Defined in:
 - lib/arachni/browser/javascript/taint_tracer/frame.rb,
lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb 
Overview
Represents a stack frame for a JS function call.
Defined Under Namespace
Classes: CalledFunction
Instance Attribute Summary collapse
- 
  
    
      #function  ⇒ CalledFunction 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Relevant function.
 - 
  
    
      #line  ⇒ Integer? 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Line number related to the called frame.
 - 
  
    
      #url  ⇒ String? 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Location of the file associated with the called frame.
 
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
 - #hash ⇒ Object
 - 
  
    
      #initialize(options = {})  ⇒ Frame 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Frame.
 - #to_h ⇒ Object (also: #to_hash)
 - #to_rpc_data ⇒ Object
 
Constructor Details
#initialize(options = {}) ⇒ Frame
Returns a new instance of Frame.
      33 34 35 36 37 38 39 40 41  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 33 def initialize( = {} ) if [:function].is_a? Hash @function = CalledFunction.new( .delete(:function) ) end .my_symbolize_keys(false).each do |k, v| send( "#{k}=", v ) end end  | 
  
Instance Attribute Details
#function ⇒ CalledFunction
Returns Relevant function.
      23 24 25  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 23 def function @function end  | 
  
#line ⇒ Integer?
Returns Line number related to the called frame.
      31 32 33  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 31 def line @line end  | 
  
#url ⇒ String?
Returns Location of the file associated with the called frame.
      27 28 29  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 27 def url @url end  | 
  
Class Method Details
.from_rpc_data(data) ⇒ Object
      63 64 65 66  | 
    
      # 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  | 
  
Instance Method Details
#==(other) ⇒ Object
      55 56 57  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 55 def ==( other ) hash == other.hash end  | 
  
#hash ⇒ Object
      51 52 53  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 51 def hash to_h.hash end  | 
  
#to_h ⇒ Object Also known as: to_hash
      43 44 45 46 47 48  | 
    
      # 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  | 
  
#to_rpc_data ⇒ Object
      59 60 61  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame.rb', line 59 def to_rpc_data to_h.merge( function: function.to_rpc_data ) end  |