katnip.model.low_level.scapy module

class katnip.model.low_level.scapy.ScapyField(value, encoder=<kitty.model.low_level.encoder.StrEncoder object>, fuzzable=True, name=None, fuzz_count=1000, seed=1024)

Bases: kitty.model.low_level.field.BaseField

Wrap a fuzzed scapy.packet.Packet object as a kitty field. Since the fuzzing parameters can be configured by the fuzz function of Scapy, this field assumes that the fuzz function was already called on the given field

Example:
from scapy.all import *
tcp_packet = IP()/TCP()
field = ScapyField(value=fuzz(tcp_packet), name='tcp packet', fuzz_count=50, seed=1000)
__init__(value, encoder=<kitty.model.low_level.encoder.StrEncoder object>, fuzzable=True, name=None, fuzz_count=1000, seed=1024)
Parameters:
  • value – scapy_packet_class
  • encoder (ENC_STR_DEFAULT) – encoder for the field
  • fuzzable – is field fuzzable (default: True)
  • name – name of the object (default: None)
  • fuzz_count – fuzz count (default: 1000)
  • seed – random seed (default: 1024)
get_info()
num_mutations()
Returns:number of mutations this field will perform
reset()