katnip.model.low_level.fs_iterators module

FS iterators contains fields that are based on files.

  • katnip.templates.fs_iterators.FsNames will return file names from the system based on its configuration.
  • katnip.templates.fs_iterators.FsContent will return the content of files from the system.
class katnip.model.low_level.fs_iterators.FsContent(path, name_filter, recurse=False, encoder=<kitty.model.low_level.encoder.StrEncoder object>, fuzzable=True, name=None)

Bases: kitty.model.low_level.field.BaseField

This field mutations are the contents of files in a given directory. It is pretty useful if you have files that were generated by a different fuzzer. You can filter the files based on the file name (name_filter), you can recurse into subdirectories (recurse) and you can pass full path or only the file name (full_path),

__init__(path, name_filter, recurse=False, encoder=<kitty.model.low_level.encoder.StrEncoder object>, fuzzable=True, name=None)
Parameters:
  • path – base path to iterate over files
  • name_filter – string to filter filenames, same as shell, not regex
  • recurse – should iterate inner directories (default: False)
  • encoder (StrEncoder) – encoder for the field
  • fuzzable – is field fuzzable (default: True)
  • name – name of the object (default: None)
get_info()
reset()
skip(count)
class katnip.model.low_level.fs_iterators.FsNames(path, name_filter, recurse=False, full_path=True, encoder=<kitty.model.low_level.encoder.StrEncoder object>, fuzzable=True, name=None)

Bases: kitty.model.low_level.field.BaseField

This field mutations are the file names in a given directory. It is pretty useful if you have files that were generated by a different fuzzer, and you only need to pass their name to your target. You can filter the files based on the file name (name_filter), you can recurse into subdirectories (recurse) and you can pass full path or only the file name (full_path),

__init__(path, name_filter, recurse=False, full_path=True, encoder=<kitty.model.low_level.encoder.StrEncoder object>, fuzzable=True, name=None)
Parameters:
  • path – base path to iterate over files
  • name_filter – string to filter filenames, same as shell, not regex
  • recurse – should iterate inner directories (default: False)
  • full_path – should include full path rather than only file name (default: True)
  • encoder (StrEncoder) – encoder for the field
  • fuzzable – is field fuzzable (default: True)
  • name – name of the object (default: None)
get_info()
reset()
skip(count)