Class: Arachni::Parser::Element::Cookie

Inherits:
Base show all
Defined in:
lib/arachni/parser/elements.rb

Instance Attribute Summary

Attributes inherited from Base

#action, #auditable, #method, #orig, #raw, #url

Attributes inherited from Element::Auditable

#altered, #opts

Instance Method Summary collapse

Methods inherited from Base

#dup, #id

Methods inherited from Element::Auditable

#audit, #audit_id, #auditor, #debug?, #get_auditor, #get_status_str, #info, #injection_sets, #override_instance_scope!, #override_instance_scope?, #print_debug, #print_error, #print_status, reset, restrict_to_elements!, #skip?, #submit

Methods included from Module::Utilities

#exception_jail, #get_path, #hash_keys_to_str, #normalize_url, #read_file, #seed, #uri_decode, #uri_encode, #uri_parse, #uri_parser, #url_sanitize

Constructor Details

#initialize(url, raw = {}) ⇒ Cookie

Returns a new instance of Cookie.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/arachni/parser/elements.rb', line 248

def initialize( url, raw = {} )
    super( url, raw )

    @action = @url
    @method = 'cookie'

    if @raw['name']
        @auditable = { @raw['name'] => @raw['value'] }
    else
        @auditable = @raw
    end

    @simple = @auditable.dup
    @auditable.reject! {
        |cookie|
        Options.instance.exclude_cookies.include?( cookie )
    }

    @orig      = @auditable.deep_clone
    @orig.freeze
end

Instance Method Details

#http_request(url, opts) ⇒ Object



270
271
272
# File 'lib/arachni/parser/elements.rb', line 270

def http_request( url, opts )
    return @auditor.http.cookie( url, opts )
end

#simpleObject



274
275
276
# File 'lib/arachni/parser/elements.rb', line 274

def simple
    return @simple
end

#typeObject



278
279
280
# File 'lib/arachni/parser/elements.rb', line 278

def type
    Arachni::Module::Auditor::Element::COOKIE
end