Class: Ruckus::Mutator::Metacharacters

Inherits:
Modifier show all
Defined in:
lib/ruckus/mutator.rb

Overview

The most likely evil metachars, but if you’re thorough, you just try all non-isalnums.

Constant Summary collapse

STRINGS =
[ ".", "/", "\\", "$", "-", "%", "$", ";",
"'", '"', "*", "\x00" ]

Instance Method Summary collapse

Methods inherited from Modifier

#<<, #go?, #initialize

Constructor Details

This class inherits a constructor from Ruckus::Mutator::Modifier

Instance Method Details

#modObject



191
192
193
194
195
196
197
198
199
# File 'lib/ruckus/mutator.rb', line 191

def mod
    x = x + STRINGS[@cur % STRINGS.size]
    if opts[:hexify]
        0.upto(x.size - 1) do |i|
            x[i] = "%#{ x[i].to_s(16) }"
        end
    end
    return x
end