class Arachni::OptionGroups::HTTP
Holds {Arachni::HTTP} related options.
@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>
Constants
- AUTHENTICATION_TYPES
@return [Array<String>]
Supported HTTP authentication types.
- PROXY_TYPES
@return [Array<String>]
Supported proxy types.
- SSL_CERTIFICATE_TYPES
@return [Array<String>]
Supported SSL certificate types.
- SSL_KEY_TYPES
@return [Array<String>]
Supported SSL private key types.
- SSL_VERSIONS
@return [Array<String>]
Supported SSL versions.
Attributes
@note Default is ‘20`.
@return [Integer]
Maximum HTTP {HTTP::Request request} concurrency. Be careful not to set this too high or you may kill the server.
@see HTTP::Request
@see HTTP::Client#max_concurrency=
@see HTTP::Client#max_concurrency
@return [Hash<String, String>]
Extra HTTP headers to be included in every HTTP Request
@see HTTP::Client#headers
@note Default is ‘500`.
@return [Integer]
Maximum amount of {HTTP::Request requests} to keep in the {HTTP::Client client} queue. More means better scheduling and better performance, less means less RAM consumption.
@see HTTP::Request
@see HTTP::Client
@note Default is ‘5’.
@return [Integer]
Amount of redirects to follow when performing HTTP {HTTP::Request requests}.
@see HTTP::Request
@note Default is ‘50_000’.
@return [Integer]
HTTP {HTTP::Request request} timeout in milliseconds.
@see HTTP::Request
@see HTTP::Client
@return [Integer]
Maximum HTTP {Arachni::HTTP::Response response} body size. If a {Arachni::HTTP::Response#body} is larger than specified it will not be retrieved.
@see HTTP::Response
@return [String]
Directory holding multiple certificate files with which to {#ssl_verify_peer verify the peer}.
@return [String]
File holding one or more certificates with which to {#ssl_verify_peer verify the peer}.
@return [String]
Path to an SSL certificate.
@return [String]
Path to an SSL private key.
@return [String]
Password for the key at {#ssl_key_filepath}.
@note Default is ‘false’.
@return [Bool]
SSL host verification.
@note Default is ‘false’.
@return [Bool]
SSL peer verification.
@note Default is “Arachni/v#{Arachni::VERSION}”.
@return [String]
HTTP User-Agent to use.
@see HTTP::Client
Public Instance Methods
@param [String] type
One of {AUTHENTICATION_TYPES}.
@raise Error::InvalidAuthenticationType
# File lib/arachni/option_groups/http.rb, line 269 def authentication_type=( type ) return @authentication_type = defaults[:authentication_type].dup if !type if !AUTHENTICATION_TYPES.include?( type.to_s ) fail Error::InvalidAuthenticationType, "Invalid authentication type: #{type} (supported: #{AUTHENTICATION_TYPES.join(', ')})" end @authentication_type = type end
@param [String] type
One of {PROXY_TYPES}.
@raise Error::InvalidProxyType
# File lib/arachni/option_groups/http.rb, line 284 def proxy_type=( type ) if !PROXY_TYPES.include?( type.to_s ) fail Error::InvalidProxyType, "Invalid proxy type: #{type} (supported: #{PROXY_TYPES.join(', ')})" end @proxy_type = type end
@param [String] type
One of {SSL_CERTIFICATE_TYPES}.
@raise Error::InvalidSSLCertificateType
# File lib/arachni/option_groups/http.rb, line 297 def ssl_certificate_type=( type ) if !SSL_CERTIFICATE_TYPES.include?( type.to_s ) fail Error::InvalidSSLCertificateType, "Invalid SSL certificate type: #{type} (supported: #{SSL_CERTIFICATE_TYPES.join(', ')})" end @ssl_certificate_type = type end
@param [String] type
One of {SSL_KEY_TYPES}.
@raise Error::InvalidSSLKeyType
# File lib/arachni/option_groups/http.rb, line 310 def ssl_key_type=( type ) if !SSL_KEY_TYPES.include?( type.to_s ) fail Error::InvalidSSLKeyType, "Invalid SSL key type: #{type} (supported: #{SSL_KEY_TYPES.join(', ')})" end @ssl_key_type = type end
@param [String] version
One of {SSL_VERSIONS}.
@raise Error::InvalidSSLVersion
# File lib/arachni/option_groups/http.rb, line 323 def ssl_version=( version ) if !SSL_VERSIONS.include?( version.to_s ) fail Error::InvalidSSLVersion, "Invalid SSL version: #{version} (supported: #{SSL_VERSIONS.join(', ')})" end @ssl_version = version end
Arachni::OptionGroup#to_rpc_data
# File lib/arachni/option_groups/http.rb, line 332 def to_rpc_data d = super d.delete 'cookie_jar_filepath' d end