Class: Arachni::OptionGroups::HTTP
- Inherits:
-
Arachni::OptionGroup
- Object
- Arachni::OptionGroup
- Arachni::OptionGroups::HTTP
- Defined in:
- lib/arachni/option_groups/http.rb
Overview
Holds HTTP related options.
Constant Summary collapse
- PROXY_TYPES =
Returns Supported proxy types.
%w(http http_1_0 socks4 socks5 socks4a)
Instance Attribute Summary collapse
-
#authentication_password ⇒ String
Password to use for HTTP authentication.
-
#authentication_username ⇒ String
Username to use for HTTP authentication.
-
#cookie_jar_filepath ⇒ String
Location of the Netscape-style cookie-jar file.
-
#cookie_string ⇒ String
Cookies in the form of a:.
-
#cookies ⇒ Hash
Cookies as ‘name=>value` pairs.
-
#proxy ⇒ String
Proxy URL (‘host:port`).
-
#proxy_host ⇒ String
Hostname or IP address of the HTTP proxy server to use.
-
#proxy_password ⇒ String
Proxy password to use.
-
#proxy_port ⇒ Integer
Port of the HTTP proxy server.
-
#proxy_type ⇒ String
HTTP proxy type, available options are:.
-
#proxy_username ⇒ String
Proxy username to use.
-
#request_concurrency ⇒ Integer
Maximum HTTP request concurrency.
-
#request_headers ⇒ Hash<String, String>
Extra HTTP headers to be included in every HTTP Request.
- #request_queue_size ⇒ Integer
-
#request_redirect_limit ⇒ Integer
Amount of redirects to follow when performing HTTP requests.
-
#request_timeout ⇒ Integer
HTTP request timeout in milliseconds.
-
#response_max_size ⇒ Integer
Maximum HTTP response body size.
-
#user_agent ⇒ String
HTTP User-Agent to use.
Instance Method Summary collapse
Methods inherited from Arachni::OptionGroup
#==, attr_accessor, attributes, #attributes, #defaults, defaults, #hash, inherited, #initialize, #merge, set_defaults, #to_h, #to_hash, #update, #validate
Constructor Details
This class inherits a constructor from Arachni::OptionGroup
Instance Attribute Details
#authentication_password ⇒ String
Returns Password to use for HTTP authentication.
71 72 73 |
# File 'lib/arachni/option_groups/http.rb', line 71 def authentication_password @authentication_password end |
#authentication_username ⇒ String
Returns Username to use for HTTP authentication.
65 66 67 |
# File 'lib/arachni/option_groups/http.rb', line 65 def authentication_username @authentication_username end |
#cookie_jar_filepath ⇒ String
Returns Location of the Netscape-style cookie-jar file.
133 134 135 |
# File 'lib/arachni/option_groups/http.rb', line 133 def @cookie_jar_filepath end |
#cookie_string ⇒ String
Returns Cookies in the form of a:
-
Request ‘Cookie` header: `name=value; name2=value2`
-
Response ‘Set-Cookie` header:
`name2=value2; Expires=Wed, 09 Jun 2021 10:18:14 GMT`.
141 142 143 |
# File 'lib/arachni/option_groups/http.rb', line 141 def @cookie_string end |
#cookies ⇒ Hash
Returns Cookies as ‘name=>value` pairs.
126 127 128 |
# File 'lib/arachni/option_groups/http.rb', line 126 def @cookies end |
#proxy ⇒ String
Returns Proxy URL (‘host:port`).
119 120 121 |
# File 'lib/arachni/option_groups/http.rb', line 119 def proxy @proxy end |
#proxy_host ⇒ String
Returns Hostname or IP address of the HTTP proxy server to use.
84 85 86 |
# File 'lib/arachni/option_groups/http.rb', line 84 def proxy_host @proxy_host end |
#proxy_password ⇒ String
Returns Proxy password to use.
102 103 104 |
# File 'lib/arachni/option_groups/http.rb', line 102 def proxy_password @proxy_password end |
#proxy_port ⇒ Integer
Returns Port of the HTTP proxy server.
90 91 92 |
# File 'lib/arachni/option_groups/http.rb', line 90 def proxy_port @proxy_port end |
#proxy_type ⇒ String
Default is ‘auto`.
Returns HTTP proxy type, available options are:
-
‘http`
-
‘socks`.
113 114 115 |
# File 'lib/arachni/option_groups/http.rb', line 113 def proxy_type @proxy_type end |
#proxy_username ⇒ String
Returns Proxy username to use.
96 97 98 |
# File 'lib/arachni/option_groups/http.rb', line 96 def proxy_username @proxy_username end |
#request_concurrency ⇒ Integer
Default is ‘20`.
Returns Maximum HTTP request concurrency. Be careful not to set this too high or you may kill the server.
37 38 39 |
# File 'lib/arachni/option_groups/http.rb', line 37 def request_concurrency @request_concurrency end |
#request_headers ⇒ Hash<String, String>
Returns Extra HTTP headers to be included in every HTTP Request.
155 156 157 |
# File 'lib/arachni/option_groups/http.rb', line 155 def request_headers @request_headers end |
#request_queue_size ⇒ Integer
50 51 52 |
# File 'lib/arachni/option_groups/http.rb', line 50 def request_queue_size @request_queue_size end |
#request_redirect_limit ⇒ Integer
Default is ‘5’.
Returns Amount of redirects to follow when performing HTTP requests.
26 27 28 |
# File 'lib/arachni/option_groups/http.rb', line 26 def request_redirect_limit @request_redirect_limit end |
#request_timeout ⇒ Integer
Default is ‘50_000’.
Returns HTTP request timeout in milliseconds.
59 60 61 |
# File 'lib/arachni/option_groups/http.rb', line 59 def request_timeout @request_timeout end |
#response_max_size ⇒ Integer
Returns Maximum HTTP response body size. If a HTTP::Response#body is larger than specified it will not be retrieved.
78 79 80 |
# File 'lib/arachni/option_groups/http.rb', line 78 def response_max_size @response_max_size end |
Instance Method Details
#to_rpc_data ⇒ Object
167 168 169 170 171 |
# File 'lib/arachni/option_groups/http.rb', line 167 def to_rpc_data d = super d.delete 'cookie_jar_filepath' d end |