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.
218 219 220 221 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 218 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.
216 217 218 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 216 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.
223 224 225 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 223 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.
227 228 229 230 231 |
# File 'lib/aikido/zen/scanners/ssrf_scanner.rb', line 227 def redirect_to URI(headers["location"]) if redirect? rescue URI::BadURIError nil end |