Method: Arachni::Parser#link_vars

Defined in:
lib/parser/parser.rb

Extracts variables and their values from a link

Parameters:

Returns:

  • (Hash)

    name=>value pairs

See Also:



402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/parser/parser.rb', line 402

def link_vars( link )
    if !link then return {} end

    var_string = link.split( /\?/ )[1]
    if !var_string then return {} end

    var_hash = Hash.new
    var_string.split( /&/ ).each {
        |pair|
        name, value = pair.split( /=/ )

        next if value == seed
        var_hash[name] = value
    }

    var_hash

end