Module: Arachni::Element::Cookie::Capabilities::Inputtable

Includes:
Arachni::Element::Capabilities::Inputtable
Defined in:
lib/arachni/element/cookie/capabilities/inputtable.rb

Overview

Author:

Constant Summary

Constants included from Arachni::Element::Capabilities::Inputtable

Arachni::Element::Capabilities::Inputtable::INPUTTABLE_CACHE

Instance Attribute Summary

Attributes included from Arachni::Element::Capabilities::Inputtable

#default_inputs, #inputs

Instance Method Summary collapse

Methods included from Arachni::Element::Capabilities::Inputtable

#[], #[]=, #changes, #dup, #has_inputs?, #inputtable_id, #reset, #to_h, #try_input, #update, #valid_input_data?, #valid_input_name?, #valid_input_name_data?, #valid_input_value?, #valid_input_value_data?

Instance Method Details

#inputs=(inputs) ⇒ Object

Examples:

p c = Cookie.from_set_cookie( 'http://owner-url.com', 'session=stuffstuffstuff' ).first
#=> ["session=stuffstuffstuff"]

p c.inputs
#=> {"session"=>"stuffstuffstuff"}

p c.inputs = { 'new-name' => 'new-value' }
#=> {"new-name"=>"new-value"}

p c
#=> new-name=new-value

Parameters:

  • inputs (Hash)

    Sets inputs.



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/arachni/element/cookie/capabilities/inputtable.rb', line 35

def inputs=( inputs )
    k = inputs.keys.first.to_s
    v = inputs.values.first.to_s

    @data[:name]  = k
    @data[:value] = v

    if k.to_s.empty?
        super( {} )
    else
        super( { k => v } )
    end
end