Class: Feroxbuster::Response
- Inherits:
-
Object
- Object
- Feroxbuster::Response
- Defined in:
- lib/feroxbuster/response.rb
Overview
Represents response data, either parsed from .txt
or .json
output.
Instance Attribute Summary collapse
-
#content_length ⇒ Integer
readonly
The
Content-Length
of the response. - #extension ⇒ String? readonly
-
#headers ⇒ Hash{String => String}?
readonly
the HTTP headers of the response.
-
#line_count ⇒ Integer
readonly
The line count of the response.
-
#method ⇒ String
readonly
The HTTP method used for the request.
-
#original_url ⇒ String
readonly
The "original" URL that was requested.
-
#path ⇒ String?
readonly
The path that was requested.
-
#status ⇒ Integer
readonly
The HTTP response status code.
-
#url ⇒ String
readonly
The URL that was requested.
- #wildcard ⇒ Boolean? readonly
-
#word_count ⇒ Integer
readonly
The word count of the response.
Instance Method Summary collapse
-
#initialize(url:, original_url: nil, path: nil, wildcard: nil, status:, method:, content_length:, line_count:, word_count:, headers: nil, extension: nil) ⇒ Response
constructor
Initializes the response object.
Constructor Details
#initialize(url:, original_url: nil, path: nil, wildcard: nil, status:, method:, content_length:, line_count:, word_count:, headers: nil, extension: nil) ⇒ Response
Initializes the response object.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/feroxbuster/response.rb', line 92 def initialize(url: , original_url: nil, path: nil, wildcard: nil, status: , method: , content_length: , line_count: , word_count: , headers: nil, extension: nil) @url = url @original_url = original_url @path = path @wildcard = wildcard @status = status @method = method @content_length = content_length @line_count = line_count @word_count = word_count @headers = headers @extension = extension end |
Instance Attribute Details
#content_length ⇒ Integer (readonly)
The Content-Length
of the response.
38 39 40 |
# File 'lib/feroxbuster/response.rb', line 38 def content_length @content_length end |
#extension ⇒ String? (readonly)
56 57 58 |
# File 'lib/feroxbuster/response.rb', line 56 def extension @extension end |
#headers ⇒ Hash{String => String}? (readonly)
the HTTP headers of the response.
53 54 55 |
# File 'lib/feroxbuster/response.rb', line 53 def headers @headers end |
#line_count ⇒ Integer (readonly)
The line count of the response.
43 44 45 |
# File 'lib/feroxbuster/response.rb', line 43 def line_count @line_count end |
#method ⇒ String (readonly)
The HTTP method used for the request.
33 34 35 |
# File 'lib/feroxbuster/response.rb', line 33 def method @method end |
#original_url ⇒ String (readonly)
The "original" URL that was requested.
15 16 17 |
# File 'lib/feroxbuster/response.rb', line 15 def original_url @original_url end |
#path ⇒ String? (readonly)
The path that was requested.
20 21 22 |
# File 'lib/feroxbuster/response.rb', line 20 def path @path end |
#status ⇒ Integer (readonly)
The HTTP response status code.
28 29 30 |
# File 'lib/feroxbuster/response.rb', line 28 def status @status end |
#url ⇒ String (readonly)
The URL that was requested.
10 11 12 |
# File 'lib/feroxbuster/response.rb', line 10 def url @url end |
#wildcard ⇒ Boolean? (readonly)
23 24 25 |
# File 'lib/feroxbuster/response.rb', line 23 def wildcard @wildcard end |
#word_count ⇒ Integer (readonly)
The word count of the response.
48 49 50 |
# File 'lib/feroxbuster/response.rb', line 48 def word_count @word_count end |