class Arachni::Browser::Javascript::TaintTracer::Sink::Base

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Attributes

trace[RW]

@return [Array<Frame>]

Stacktrace.

Public Class Methods

from_rpc_data( data ) click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 52
def self.from_rpc_data( data )
    data['trace'] = data['trace'].map { |d| Frame.from_rpc_data( d ) }
    new data
end
new( options = {} ) click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 22
def initialize( options = {} )
    options.my_symbolize_keys(false).each do |k, v|
        send( "#{k}=", v )
    end

    @trace ||= []
end

Public Instance Methods

==( other ) click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 44
def ==( other )
    hash == other.hash
end
hash() click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 40
def hash
    to_h.hash
end
to_h() click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 30
def to_h
    instance_variables.inject({}) do |h, iv|
        h[iv.to_s.gsub('@', '').to_sym] = instance_variable_get( iv )
        h
    end.merge( trace: trace.map(&:to_h))
end
to_hash() click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 36
def to_hash
    to_h
end
to_rpc_data() click to toggle source
# File lib/arachni/browser/javascript/taint_tracer/sink/base.rb, line 48
def to_rpc_data
    to_h.merge( trace: trace.map(&:to_rpc_data) )
end