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.
155 156 157 158 159 |
# File 'lib/aikido/zen/attack.rb', line 155 def initialize(request:, input:, **opts) super(**opts) @input = input @request = request end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
152 153 154 |
# File 'lib/aikido/zen/attack.rb', line 152 def input @input end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
153 154 155 |
# File 'lib/aikido/zen/attack.rb', line 153 def request @request end |
Instance Method Details
#exception ⇒ Object
169 170 171 |
# File 'lib/aikido/zen/attack.rb', line 169 def exception(*) SSRFDetectedError.new(self) end |
#humanized_name ⇒ Object
161 162 163 |
# File 'lib/aikido/zen/attack.rb', line 161 def humanized_name "server-side request forgery" end |
#kind ⇒ Object
165 166 167 |
# File 'lib/aikido/zen/attack.rb', line 165 def kind "ssrf" end |
#metadata ⇒ Object
173 174 175 176 177 178 |
# File 'lib/aikido/zen/attack.rb', line 173 def { hostname: @request.uri.hostname, port: @request.uri.port.to_s } end |