ronin-ruby/ronin-support — Issue #2: Add String#fuzz
Author: postmodern
Created: 2011-10-09 10:09:08+00:00
State: open

Add a `fuzz` method to the `String` class. This method will enumerate over possible mutations of a String. Can probably backport most of the code from [sophsec/wordlist](http://github.com/sophsec/wordlist).

## Examples

# Replace ":" with "\0"
"Content-Type: text/html".fuzz(':' => "\0")

# Replace ":" and the ending with "\0"
"Content-Type: text/html".fuzz(/[:$]/ => "\0")

# Replace ":" with "\n", "\r\n", "\0" and "::"
"Content-Type: text/html".fuzz(':' => ["\n", "\r\n", "\0", "::"])