Class: InjectionReport

Inherits:
Object
  • Object
show all
Defined in:
lib/api-tester/modules/injection_module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(injection_type, url, payload, response) ⇒ InjectionReport

Returns a new instance of InjectionReport.



52
53
54
55
56
57
# File 'lib/api-tester/modules/injection_module.rb', line 52

def initialize injection_type, url, payload, response
  self.injection_type = injection_type
  self.url = url
  self.payload = payload
  self.response = response
end

Instance Attribute Details

#injection_typeObject

Returns the value of attribute injection_type.



47
48
49
# File 'lib/api-tester/modules/injection_module.rb', line 47

def injection_type
  @injection_type
end

#payloadObject

Returns the value of attribute payload.



49
50
51
# File 'lib/api-tester/modules/injection_module.rb', line 49

def payload
  @payload
end

#responseObject

Returns the value of attribute response.



50
51
52
# File 'lib/api-tester/modules/injection_module.rb', line 50

def response
  @response
end

#urlObject

Returns the value of attribute url.



48
49
50
# File 'lib/api-tester/modules/injection_module.rb', line 48

def url
  @url
end

Instance Method Details



59
60
61
62
63
64
65
# File 'lib/api-tester/modules/injection_module.rb', line 59

def print
  puts "Found potential #{self.injection_type}: "
  puts "   Requested #{self.url} with payload:"
  puts "      #{self.payload}"
  puts '   Received: '
  puts "      #{self.response}"
end