Class: InjectionReport

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

Overview

Report for InjectionModule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of InjectionReport.



73
74
75
76
77
78
# File 'lib/api-tester/modules/injection_module.rb', line 73

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.



71
72
73
# File 'lib/api-tester/modules/injection_module.rb', line 71

def injection_type
  @injection_type
end

#payloadObject

Returns the value of attribute payload.



71
72
73
# File 'lib/api-tester/modules/injection_module.rb', line 71

def payload
  @payload
end

#responseObject

Returns the value of attribute response.



71
72
73
# File 'lib/api-tester/modules/injection_module.rb', line 71

def response
  @response
end

#urlObject

Returns the value of attribute url.



71
72
73
# File 'lib/api-tester/modules/injection_module.rb', line 71

def url
  @url
end

Instance Method Details



80
81
82
83
84
85
86
# File 'lib/api-tester/modules/injection_module.rb', line 80

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