Class: Aikido::Zen::Scanners::SSRFScanner::Response Private
- Inherits:
-
Object
- Object
- Aikido::Zen::Scanners::SSRFScanner::Response
- Includes:
- Headers
- Defined in:
- lib/aikido/zen/scanners/ssrf_scanner.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #status ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(status:, **header_options) ⇒ Response
constructor
private
A new instance of Response.
- #redirect? ⇒ Boolean private
- #redirect_to ⇒ Object private
Methods included from Headers
Constructor Details
#initialize(status:, **header_options) ⇒ Response
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Response.
212 213 214 215 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 212 def initialize(status:, **) super(**) @status = status.to_s end |
Instance Attribute Details
#status ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
210 211 212 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 210 def status @status end |
Instance Method Details
#redirect? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
217 218 219 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 217 def redirect? @status.start_with?("3") && headers["location"] end |
#redirect_to ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
221 222 223 224 225 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 221 def redirect_to URI(headers["location"]) if redirect? rescue URI::BadURIError nil end |