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

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

Instance Attribute Summary

Attributes inherited from Base

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

Attributes inherited from Element::Auditable

#altered, #opts

Instance Method Summary collapse

Methods inherited from Base

#id

Methods inherited from Element::Auditable

#audit, #auditor, #debug?, #get_status_str, #info, #injection_sets, #print_debug, #print_error, #print_status, reset, #skip?, #submit

Methods included from Module::Utilities

#exception_jail, #get_path, #normalize_url, #read_file, #seed

Constructor Details

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

Returns a new instance of Cookie.



239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/parser/elements.rb', line 239

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

    @action = @url
    @method = 'cookie'

    @auditable = { @raw['name'] => @raw['value'] }
    @simple = @auditable.dup
    @auditable.reject! {
        |cookie|
        Options.instance.exclude_cookies.include?( cookie )
    }
end

Instance Method Details

#http_request(url, opts) ⇒ Object



253
254
255
# File 'lib/parser/elements.rb', line 253

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

#simpleObject



257
258
259
# File 'lib/parser/elements.rb', line 257

def simple
    return @simple
end

#typeObject



261
262
263
# File 'lib/parser/elements.rb', line 261

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