Module: Arachni::Element::Header::Capabilities::Mutable

Includes:
Capabilities::Mutable
Defined in:
lib/arachni/element/header/capabilities/mutable.rb

Overview

Extends Capabilities::Mutable with Arachni::Element::Header-specific functionality.

Author:

  • Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Constant Summary

Constants included from Capabilities::Mutable

Capabilities::Mutable::EXTRA_NAME, Capabilities::Mutable::FUZZ_NAME, Capabilities::Mutable::FUZZ_NAME_VALUE, Capabilities::Mutable::MUTATION_OPTIONS

Instance Attribute Summary

Attributes included from Capabilities::Mutable

#affected_input_name, #format, #seed

Instance Method Summary collapse

Methods included from Capabilities::Mutable

#affected_input_value, #affected_input_value=, #dup, #immutables, #inspect, #mutation?, #mutations, #parameter_name_audit?, #reset, #switch_method, #to_h, #to_rpc_data, #with_raw_payload, #with_raw_payload?

Instance Method Details

#each_mutation(payload, options = {}) {|mutation| ... } ⇒ Object

Overrides #each_mutation to handle header-specific limitations.

Parameters:

Yields:

  • (mutation)

    Each generated mutation.

Yield Parameters:

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/arachni/element/header/capabilities/mutable.rb', line 29

def each_mutation( payload, options = {}, &block )
    options = options.dup
    parameter_names = options.delete( :parameter_names )

    super( payload, options, &block )

    return if !parameter_names

    if !valid_input_name_data?( payload )
        print_debug_level_2 'Payload not supported as input name by' <<
                                " #{audit_id}: #{payload.inspect}"
        return
    end

    elem = self.dup
    elem.affected_input_name = FUZZ_NAME
    elem.inputs = { payload => FUZZ_NAME_VALUE }
    yield elem
end