Module antiparser :: Class apKeywords
[frames | no frames]

Class apKeywords

apObject --+
           |
          apKeywords


apKeywords represents a list of random values to prepend to the content of the data object.

The main application of apKeywords is to provide a list of commands or strings to randomly cycle through when fuzzing. apKeywords can be adapted to represent semi-static data where the initial part of the data has a limited set of values but the rest of the data is random.
Method Summary
  __init__(self)
Constructor that is called when the class is instantiated.
  getContentSize(self)
Returns the length of the current content.
  getCurrentKeyword(self)
Returns the current keyword associated with the data object.
  getIllegalChars(self)
Returns a list of illegal characters.
  getKeywords(self)
Returns the list of keywords associated with the data object.
  getSeparator(self)
Returns the separator string for the keywords.
  getTerminator(self)
Returns a terminator string.
  setCurrentKeyword(self, keyword)
Sets the current keyword associated with the data object.
  setIllegalChars(self, chars)
Sets a string of illegal characters.
  setKeywords(self, keywords)
Sets the list of keywords for the data object.
  setSeparator(self, separator)
Sets a separator string for the data object.
  setTerminator(self, terminator)
Sets a terminator string for the data object.
    Inherited from apObject
  display(self)
Print the data object.
  getByteOrder(self)
Returns the byteorder property of the data object.
  getContent(self)
Returns the content of the data object.
  getDebug(self)
Returns the debugging status of the data object.
  getMaxSize(self)
Gets the maxsize property of the data object.
  getMinSize(self)
Returns the minsize property of the data object.
  getMode(self)
Returns the mode that is currently enabled for the data object.
  getOptional(self)
Return the optional property value of the data object.
  getStatic(self)
Returns the static property value of the data object.
  setByteOrder(self, byteorder)
Sets the byteorder property of the data object to "big" or "little" endian.
  setContent(self, content)
Sets the content of the data object.
  setDebug(self, debug)
Sets the debugging status to True or False.
  setMaxSize(self, maxsize)
Sets the maxsize property of the data object to an integer.
  setMinSize(self, minsize)
Sets the minsize property of the data object to an integer.
  setMode(self, mode)
Sets the mode for the data object.
  setOptional(self, optional)
Sets the optional property of the data object to True or False.
  setStatic(self, static)
Sets the static property of the data object to True or False.

Method Details

__init__(self)
(Constructor)

Constructor that is called when the class is instantiated.
Overrides:
antiparser.apObject.__init__ (inherited documentation)

getContentSize(self)

Returns the length of the current content.

getCurrentKeyword(self)

Returns the current keyword associated with the data object.

getIllegalChars(self)

Returns a list of illegal characters.

getKeywords(self)

Returns the list of keywords associated with the data object.

getSeparator(self)

Returns the separator string for the keywords.

getTerminator(self)

Returns a terminator string.

setCurrentKeyword(self, keyword)

Sets the current keyword associated with the data object.

setIllegalChars(self, chars)

Sets a string of illegal characters.

illegalchars alsos the user to specify characters that will not be included in the antiparser payload for the data object. illegalchars is a string value, and defaults to an empty string. Calling this method changes the range of legal characters, ie: the charRange field.

setKeywords(self, keywords)

Sets the list of keywords for the data object.

keywords represents a list of values. The antiparser will choose a random value from this list for every permutation. The antiparser will then append the random content to the keyword. The default value is an empty list. This will also set the current keyword associated with the data object to the first keyword in the list.

setSeparator(self, separator)

Sets a separator string for the data object.

separator is a static string of characters that will be appended to the keyword before the beginning of the content. This is useful if certain characters are needed separate a keyword from its arguments. separator defaults to an empty string, indicating that no separator will be added between the keyword and the content.

setTerminator(self, terminator)

Sets a terminator string for the data object.

terminator is a static string of characters that will be appended to the end of the data object content. This is useful for protocols where each field is terminated, such as fields in an HTTP header. terminator defaults to None, indicating that no terminator is to be used for the data object.

Generated by Epydoc 2.1 on Wed Aug 17 09:02:50 2005 http://epydoc.sf.net
SourceForge.net Logo