kitty.fuzzers.base module

This module contains BaseFuzzer, which implements most of the fuzzing logic for both Server and Client fuzzing.

This module should not be overriden/referenced by entities outside of kitty, as it is tightly coupled to the implementation of the Client and Server fuzzer, and will probably be changed in the future.

class kitty.fuzzers.base.BaseFuzzer(name='', logger=None, option_line=None)[source]

Bases: kitty.core.kitty_object.KittyObject

Common members and logic for client and server fuzzers. This class should not be instantiated, only subclassed.

__init__(name='', logger=None, option_line=None)[source]
Parameters:
  • name – name of the object
  • logger – logger for the object (default: None)
  • option_line – cmd line options to the fuzzer (dafult: None)
handle_stage_changed(model)[source]

handle a stage change in the data model

Parameters:model – the data model that was changed
set_delay_between_tests(delay_secs)[source]

Set duration between tests

Parameters:delay_secs – delay between tests (in seconds)
set_delay_duration(delay_duration)[source]

Deprecated since version use: set_delay_between_tests()

set_interface(interface)[source]
Parameters:interface – user interface
set_max_failures(max_failures)[source]
Parameters:max_failures – maximum failures before stopping the fuzzing session
set_model(model)[source]

Set the model to fuzz

Parameters:model (BaseModel or a subclass) – Model object to fuzz
set_range(start_index=0, end_index=None)[source]

Set range of tests to run

Deprecated since version use: set_test_list()

Parameters:
  • start_index – index to start at (default=0)
  • end_index – index to end at(default=None)
set_session_file(filename)[source]

Set session file name, to keep state between runs

Parameters:filename – session file name
set_skip_env_test(skip_env_test=True)[source]

Set whether to skip the environment test. Call this if the environment test cannot pass and you prefer to start the tests without it.

Parameters:skip_env_test – skip the environment test (default: True)
set_store_all_reports(store_all_reports)[source]
Parameters:store_all_reports – should all reports be stored
set_target(target)[source]
Parameters:target – target object
set_test_list(test_list_str='')[source]
Parameters:test_list_str – listing of the test to execute

The test list should be a comma-delimited string, and each element should be one of the following forms:

‘-x’ - run from test 0 to test x ‘x-‘ - run from test x to the end ‘x’ - run test x ‘x-y’ - run from test x to test y

To execute all tests, pass None or an empty string

start()[source]

Start the fuzzing session

If fuzzer already running, it will return immediatly

stop()[source]

stop the fuzzing session