Class: Arachni::Browser::Javascript::TaintTracer::Frame::CalledFunction
- Defined in:
 - lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb
 
Overview
Instance Attribute Summary collapse
- 
  
    
      #arguments  ⇒ Array 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Arguments passed to the relevant function.
 - 
  
    
      #name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Name of the function.
 - 
  
    
      #source  ⇒ String? 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Source of the function.
 
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
 - #hash ⇒ Object
 - 
  
    
      #initialize(options = {})  ⇒ CalledFunction 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of CalledFunction.
 - #signature ⇒ Object
 - #signature_arguments ⇒ Object
 - #to_h ⇒ Object (also: #to_hash)
 - #to_rpc_data ⇒ Object
 
Constructor Details
#initialize(options = {}) ⇒ CalledFunction
Returns a new instance of CalledFunction.
      30 31 32 33 34  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 30 def initialize( = {} ) .my_symbolize_keys(false).each do |k, v| send( "#{k}=", v ) end end  | 
  
Instance Attribute Details
#arguments ⇒ Array
Returns Arguments passed to the relevant function.
      28 29 30  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 28 def arguments @arguments end  | 
  
#name ⇒ String
Returns Name of the function.
      24 25 26  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 24 def name @name end  | 
  
#source ⇒ String?
Returns Source of the function.
      20 21 22  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 20 def source @source end  | 
  
Class Method Details
.from_rpc_data(data) ⇒ Object
      66 67 68  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 66 def self.from_rpc_data( data ) new data end  | 
  
Instance Method Details
#==(other) ⇒ Object
      58 59 60  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 58 def ==( other ) hash == other.hash end  | 
  
#hash ⇒ Object
      54 55 56  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 54 def hash to_h.hash end  | 
  
#signature ⇒ Object
      41 42 43 44  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 41 def signature return if !@source @source.match( /function\s*(.*?)\s*\{/m )[1] end  | 
  
#signature_arguments ⇒ Object
      36 37 38 39  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 36 def signature_arguments return if !signature signature.match( /\((.*)\)/ )[1].split( ',' ).map(&:strip) end  | 
  
#to_h ⇒ Object Also known as: to_hash
      46 47 48 49 50 51  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 46 def to_h instance_variables.inject({}) do |h, iv| h[iv.to_s.gsub('@', '').to_sym] = instance_variable_get( iv ) h end end  | 
  
#to_rpc_data ⇒ Object
      62 63 64  | 
    
      # File 'lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb', line 62 def to_rpc_data to_h end  |