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.
Defined Under Namespace
Classes: Error
Constant Summary collapse
- PROXY_TYPES =
Returns Supported proxy types.
%w(http http_1_0 socks4 socks5 socks4a)
- SSL_CERTIFICATE_TYPES =
Returns Supported SSL certificate types.
%w(pem der)
- SSL_KEY_TYPES =
Returns Supported SSL private key types.
SSL_CERTIFICATE_TYPES
- SSL_VERSIONS =
Returns Supported SSL versions.
%w(TLSv1 TLSv1_0 TLSv1_1 TLSv1_2 SSLv2 SSLv3)
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.
-
#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.
-
#ssl_ca_directory ⇒ String
Directory holding multiple certificate files with which to verify the peer.
-
#ssl_ca_filepath ⇒ String
File holding one or more certificates with which to verify the peer.
-
#ssl_certificate_filepath ⇒ String
Path to an SSL certificate.
-
#ssl_certificate_type ⇒ String
Type of the certificate at #ssl_certificate_filepath.
-
#ssl_key_filepath ⇒ String
Path to an SSL private key.
-
#ssl_key_password ⇒ String
Password for the key at #ssl_key_filepath.
-
#ssl_key_type ⇒ String
Type of the key at #ssl_key_filepath.
-
#ssl_verify_host ⇒ Bool
SSL host verification.
-
#ssl_verify_peer ⇒ Bool
SSL peer verification.
-
#ssl_version ⇒ String
SSL version to use.
-
#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.
104 105 106 |
# File 'lib/arachni/option_groups/http.rb', line 104 def authentication_password @authentication_password end |
#authentication_username ⇒ String
Returns Username to use for HTTP authentication.
98 99 100 |
# File 'lib/arachni/option_groups/http.rb', line 98 def authentication_username @authentication_username end |
#cookie_jar_filepath ⇒ String
Returns Location of the Netscape-style cookie-jar file.
164 165 166 |
# File 'lib/arachni/option_groups/http.rb', line 164 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`.
172 173 174 |
# File 'lib/arachni/option_groups/http.rb', line 172 def @cookie_string end |
#cookies ⇒ Hash
Returns Cookies as ‘name=>value` pairs.
157 158 159 |
# File 'lib/arachni/option_groups/http.rb', line 157 def @cookies end |
#proxy ⇒ String
Returns Proxy URL (‘host:port`).
150 151 152 |
# File 'lib/arachni/option_groups/http.rb', line 150 def proxy @proxy end |
#proxy_host ⇒ String
Returns Hostname or IP address of the HTTP proxy server to use.
117 118 119 |
# File 'lib/arachni/option_groups/http.rb', line 117 def proxy_host @proxy_host end |
#proxy_password ⇒ String
Returns Proxy password to use.
135 136 137 |
# File 'lib/arachni/option_groups/http.rb', line 135 def proxy_password @proxy_password end |
#proxy_port ⇒ Integer
Returns Port of the HTTP proxy server.
123 124 125 |
# File 'lib/arachni/option_groups/http.rb', line 123 def proxy_port @proxy_port end |
#proxy_type ⇒ String
Default is ‘auto`.
Returns HTTP proxy type.
144 145 146 |
# File 'lib/arachni/option_groups/http.rb', line 144 def proxy_type @proxy_type end |
#proxy_username ⇒ String
Returns Proxy username to use.
129 130 131 |
# File 'lib/arachni/option_groups/http.rb', line 129 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.
70 71 72 |
# File 'lib/arachni/option_groups/http.rb', line 70 def request_concurrency @request_concurrency end |
#request_headers ⇒ Hash<String, String>
Returns Extra HTTP headers to be included in every HTTP Request.
186 187 188 |
# File 'lib/arachni/option_groups/http.rb', line 186 def request_headers @request_headers end |
#request_queue_size ⇒ Integer
83 84 85 |
# File 'lib/arachni/option_groups/http.rb', line 83 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.
59 60 61 |
# File 'lib/arachni/option_groups/http.rb', line 59 def request_redirect_limit @request_redirect_limit end |
#request_timeout ⇒ Integer
Default is ‘50_000’.
Returns HTTP request timeout in milliseconds.
92 93 94 |
# File 'lib/arachni/option_groups/http.rb', line 92 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.
111 112 113 |
# File 'lib/arachni/option_groups/http.rb', line 111 def response_max_size @response_max_size end |
#ssl_ca_directory ⇒ String
Returns Directory holding multiple certificate files with which to verify the peer.
232 233 234 |
# File 'lib/arachni/option_groups/http.rb', line 232 def ssl_ca_directory @ssl_ca_directory end |
#ssl_ca_filepath ⇒ String
Returns File holding one or more certificates with which to verify the peer.
227 228 229 |
# File 'lib/arachni/option_groups/http.rb', line 227 def ssl_ca_filepath @ssl_ca_filepath end |
#ssl_certificate_filepath ⇒ String
Returns Path to an SSL certificate.
202 203 204 |
# File 'lib/arachni/option_groups/http.rb', line 202 def ssl_certificate_filepath @ssl_certificate_filepath end |
#ssl_certificate_type ⇒ String
Returns Type of the certificate at #ssl_certificate_filepath.
208 209 210 |
# File 'lib/arachni/option_groups/http.rb', line 208 def ssl_certificate_type @ssl_certificate_type end |
#ssl_key_filepath ⇒ String
Returns Path to an SSL private key.
212 213 214 |
# File 'lib/arachni/option_groups/http.rb', line 212 def ssl_key_filepath @ssl_key_filepath end |
#ssl_key_password ⇒ String
Returns Password for the key at #ssl_key_filepath.
222 223 224 |
# File 'lib/arachni/option_groups/http.rb', line 222 def ssl_key_password @ssl_key_password end |
#ssl_key_type ⇒ String
Returns Type of the key at #ssl_key_filepath.
218 219 220 |
# File 'lib/arachni/option_groups/http.rb', line 218 def ssl_key_type @ssl_key_type end |
#ssl_verify_host ⇒ Bool
Default is ‘false’.
Returns SSL host verification.
198 199 200 |
# File 'lib/arachni/option_groups/http.rb', line 198 def ssl_verify_host @ssl_verify_host end |
#ssl_verify_peer ⇒ Bool
Default is ‘false’.
Returns SSL peer verification.
192 193 194 |
# File 'lib/arachni/option_groups/http.rb', line 192 def ssl_verify_peer @ssl_verify_peer end |
#ssl_version ⇒ String
Returns SSL version to use.
238 239 240 |
# File 'lib/arachni/option_groups/http.rb', line 238 def ssl_version @ssl_version end |
Instance Method Details
#to_rpc_data ⇒ Object
303 304 305 306 307 |
# File 'lib/arachni/option_groups/http.rb', line 303 def to_rpc_data d = super d.delete 'cookie_jar_filepath' d end |