Package sulley :: Module primitives :: Class string
[show private | hide private]
[frames | no frames]

Type string

    object --+    
             |    
base_primitive --+
                 |
                string


Method Summary
  __init__(self, value, size, padding, encoding, fuzzable, name)
Primitive that cycles through a library of "bad" strings.
  add_long_strings(self, sequence)
Given a sequence, generate a number of selectively chosen strings lengths of the given sequence and add to the string heuristic library.
  render(self)
Render the primitive, encode the string according to the specified encoding.
    Inherited from base_primitive
Integer exhaust(self)
Exhaust the possible mutations for this primitive.
Boolean mutate(self)
Mutate the primitive by stepping through the fuzz library, return False on completion.
Integer num_mutations(self)
Calculate and return the total number of mutations for this individual primitive.
  reset(self)
Reset this primitive to the starting mutation state.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, value, size=-1, padding='\x00', encoding='ascii', fuzzable=True, name=None)
(Constructor)

Primitive that cycles through a library of "bad" strings.
Parameters:
value - Default string value
           (type=String)
size - (Optional, def=-1) Static size of this field, leave -1 for dynamic.
           (type=Integer)
padding - (Optional, def="\x00") Value to use as padding to fill static field size.
           (type=Character)
encoding - (Optonal, def="ascii") String encoding, ex: utf_16_le for Microsoft Unicode.
           (type=String)
fuzzable - (Optional, def=True) Enable/disable fuzzing of this primitive
           (type=Boolean)
name - (Optional, def=None) Specifying a name gives you direct access to a primitive
           (type=String)
Overrides:
sulley.primitives.base_primitive.__init__

add_long_strings(self, sequence)

Given a sequence, generate a number of selectively chosen strings lengths of the given sequence and add to the string heuristic library.
Parameters:
sequence - Sequence to repeat for creation of fuzz strings.
           (type=String)

render(self)

Render the primitive, encode the string according to the specified encoding.
Overrides:
sulley.primitives.base_primitive.render

Generated by Epydoc 2.1 on Fri Jul 27 17:40:03 2007 http://epydoc.sf.net