Class: Aikido::Zen::Attacks::SSRFAttack
- Inherits:
-
Aikido::Zen::Attack
- Object
- Aikido::Zen::Attack
- Aikido::Zen::Attacks::SSRFAttack
- Defined in:
- lib/aikido/zen/attack.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Attributes inherited from Aikido::Zen::Attack
Instance Method Summary collapse
- #exception ⇒ Object
- #humanized_name ⇒ Object
-
#initialize(request:, input:, **opts) ⇒ SSRFAttack
constructor
A new instance of SSRFAttack.
- #kind ⇒ Object
- #metadata ⇒ Object
Methods inherited from Aikido::Zen::Attack
#as_json, #blocked?, #will_be_blocked!
Constructor Details
#initialize(request:, input:, **opts) ⇒ SSRFAttack
Returns a new instance of SSRFAttack.
148 149 150 151 152 |
# File 'lib/aikido/zen/attack.rb', line 148 def initialize(request:, input:, **opts) super(**opts) @input = input @request = request end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
145 146 147 |
# File 'lib/aikido/zen/attack.rb', line 145 def input @input end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
146 147 148 |
# File 'lib/aikido/zen/attack.rb', line 146 def request @request end |
Instance Method Details
#exception ⇒ Object
162 163 164 |
# File 'lib/aikido/zen/attack.rb', line 162 def exception(*) SSRFDetectedError.new(self) end |
#humanized_name ⇒ Object
154 155 156 |
# File 'lib/aikido/zen/attack.rb', line 154 def humanized_name "server-side request forgery" end |
#kind ⇒ Object
158 159 160 |
# File 'lib/aikido/zen/attack.rb', line 158 def kind "ssrf" end |
#metadata ⇒ Object
166 167 168 169 170 171 |
# File 'lib/aikido/zen/attack.rb', line 166 def { host: @request.uri.hostname, port: @request.uri.port } end |