Package Peach :: Package Generators :: Module untidy :: Class xmlFuzzer
[hide private]

Class xmlFuzzer

source code

This class fuzzes an xml string.


Author: Andres Riancho ( andres.riancho@gmail.com )

Instance Methods [hide private]
 
__init__(self) source code
 
setRepetitions(self, rep) source code
 
_toList(self, xmlString)
This method separates an xml in a "line by line" form.
source code
 
_getFuzzFunctions(self)
Returns: A list of fuzzing functions.
source code
 
_generateIterator(self, fuzzedItems)
Returns: This method generates and iterator object that returns a string representation of a fuzzed xml on every call to next()
source code
 
fuzz(self, xmlString)
This method does all the work
source code
Method Details [hide private]

_toList(self, xmlString)

source code 

This method separates an xml in a "line by line" form.

Example: xmlString: "<xml a="b">f00</xml>" result: [ '<xml a="b">' , 'f00', '</xml>']

REX/Python

Based on Robert D. Cameron's REX/Perl 1.0.=20

Original copyright notice follows:

REX/Perl 1.0

Robert D. Cameron "REX: XML Shallow Parsing with Regular Expressions", Technical Report TR 1998-17, School of Computing Science, Simon Fraser=20 University, November, 1998. Copyright (c) 1998, Robert D. Cameron.=20 The following code may be freely used and distributed provided that this copyright and citation notice remains intact and that modifications or additions are clearly identified.

Parameters:
  • xmlString - A string representation of the xml
Returns:
A list of strings.

_getFuzzFunctions(self)

source code 
Returns:
A list of fuzzing functions.

_generateIterator(self, fuzzedItems)

source code 
Returns:
This method generates and iterator object that returns a string representation of a fuzzed xml on every call to next()

fuzz(self, xmlString)

source code 

This method does all the work

Parameters:
  • xmlString - A string representation of the xml to fuzz
Returns:
An iterator object that returns a fuzzed xml on every call to next()