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 socks4a socks5 socks5h)
- AUTHENTICATION_TYPES =
          
Returns Supported HTTP authentication types.
 %w(auto basic digest digest_ie negotiate ntlm)
- 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_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Authentication type.
 - 
  
    
      #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 `Set-Cookie` response header: `name2=value2; Expires=Wed, 09 Jun 2021 10:18:14 GMT`.
 - 
  
    
      #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.
      112 113 114  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 112 def authentication_password @authentication_password end  | 
  
#authentication_type ⇒ String
Default is `auto`.
Returns Authentication type.
      120 121 122  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 120 def authentication_type @authentication_type end  | 
  
#authentication_username ⇒ String
Returns Username to use for HTTP authentication.
      106 107 108  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 106 def authentication_username @authentication_username end  | 
  
#cookie_jar_filepath ⇒ String
Returns Location of the Netscape-style cookie-jar file.
      180 181 182  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 180 def @cookie_jar_filepath end  | 
  
#cookie_string ⇒ String
Returns Cookies in the form of a `Set-Cookie` response header:
`name2=value2; Expires=Wed, 09 Jun 2021 10:18:14 GMT`.
  
      185 186 187  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 185 def @cookie_string end  | 
  
#cookies ⇒ Hash
Returns Cookies as `name=>value` pairs.
      173 174 175  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 173 def @cookies end  | 
  
#proxy ⇒ String
Returns Proxy URL (`host:port`).
      166 167 168  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 166 def proxy @proxy end  | 
  
#proxy_host ⇒ String
Returns Hostname or IP address of the HTTP proxy server to use.
      133 134 135  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 133 def proxy_host @proxy_host end  | 
  
#proxy_password ⇒ String
Returns Proxy password to use.
      151 152 153  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 151 def proxy_password @proxy_password end  | 
  
#proxy_port ⇒ Integer
Returns Port of the HTTP proxy server.
      139 140 141  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 139 def proxy_port @proxy_port end  | 
  
#proxy_type ⇒ String
Default is `auto`.
Returns HTTP proxy type.
      160 161 162  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 160 def proxy_type @proxy_type end  | 
  
#proxy_username ⇒ String
Returns Proxy username to use.
      145 146 147  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 145 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.
      78 79 80  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 78 def request_concurrency @request_concurrency end  | 
  
#request_headers ⇒ Hash<String, String>
Returns Extra HTTP headers to be included in every HTTP Request.
      199 200 201  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 199 def request_headers @request_headers end  | 
  
#request_queue_size ⇒ Integer
      91 92 93  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 91 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.
      67 68 69  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 67 def request_redirect_limit @request_redirect_limit end  | 
  
#request_timeout ⇒ Integer
Default is '50_000'.
Returns HTTP request timeout in milliseconds.
      100 101 102  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 100 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.
      127 128 129  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 127 def response_max_size @response_max_size end  | 
  
#ssl_ca_directory ⇒ String
Returns Directory holding multiple certificate files with which to verify the peer.
      245 246 247  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 245 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.
      240 241 242  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 240 def ssl_ca_filepath @ssl_ca_filepath end  | 
  
#ssl_certificate_filepath ⇒ String
Returns Path to an SSL certificate.
      215 216 217  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 215 def ssl_certificate_filepath @ssl_certificate_filepath end  | 
  
#ssl_certificate_type ⇒ String
Returns Type of the certificate at #ssl_certificate_filepath.
      221 222 223  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 221 def ssl_certificate_type @ssl_certificate_type end  | 
  
#ssl_key_filepath ⇒ String
Returns Path to an SSL private key.
      225 226 227  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 225 def ssl_key_filepath @ssl_key_filepath end  | 
  
#ssl_key_password ⇒ String
Returns Password for the key at #ssl_key_filepath.
      235 236 237  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 235 def ssl_key_password @ssl_key_password end  | 
  
#ssl_key_type ⇒ String
Returns Type of the key at #ssl_key_filepath.
      231 232 233  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 231 def ssl_key_type @ssl_key_type end  | 
  
#ssl_verify_host ⇒ Bool
Default is 'false'.
Returns SSL host verification.
      211 212 213  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 211 def ssl_verify_host @ssl_verify_host end  | 
  
#ssl_verify_peer ⇒ Bool
Default is 'false'.
Returns SSL peer verification.
      205 206 207  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 205 def ssl_verify_peer @ssl_verify_peer end  | 
  
#ssl_version ⇒ String
Returns SSL version to use.
      251 252 253  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 251 def ssl_version @ssl_version end  | 
  
Instance Method Details
#to_rpc_data ⇒ Object
      332 333 334 335 336  | 
    
      # File 'lib/arachni/option_groups/http.rb', line 332 def to_rpc_data d = super d.delete 'cookie_jar_filepath' d end  |