Peach :: Generators :: data :: StringTokenFuzzer :: Class StringTokenFuzzer
[hide private]

Class StringTokenFuzzer

source code


Performs fuzzing on each segment of a string. A string segment is defined as a word or portion boundry. There is an order of precidence for each boundry character. Each portion of the string is fuzzed, then it's children are fuzzed, and so on.

Instance Methods [hide private]
 
__init__(self, group, string, tokens=None, generator=None) source code
 
_split(self, string, tok)
A version of split that also returns the tokens.
source code
 
_tokenTree(self, token, node) source code
 
buildString(self, node=None)
Reassemble node tree into a string
source code
Method Details [hide private]

__init__(self, group, string, tokens=None, generator=None)
(Constructor)

source code 
Parameters:
  • group (Group) - Group to assign this generator to
  • string (String) - String to segment and fuzz
  • tokens (Array) - [optional] Array of tokens in order of precidence
  • generator (Generator) - [optional] Generator to use for fuzzing each segment

    Test strings

    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5