katnip.targets.application module

class katnip.targets.application.ApplicationTarget(name, path, args, env=None, tempfile=None, timeout=2, logger=None)

Bases: kitty.targets.server.ServerTarget

ApplicationTarget will run an application for each fuzzed payloads

__init__(name, path, args, env=None, tempfile=None, timeout=2, logger=None)
Parameters:
  • name – name of the object
  • path – path to the target executable
  • args – arguments to pass to the process
  • env – the process environment (default: None)
  • tempfile – temp filename to be created with the mutated data as contents (default: None)
  • timeout – seconds to wait for the process stdout and stderr output before kill (default: 2)
  • logger – logger for this object (default: None)
Example:
ApplicationTarget(
    name='ApplicationTarget',
    path='/tmp/myApp',
    args=['-a', '-b', '-c tempdata.bin'],
    env=None,
    tempfile='/tmp/tempdata.bin',
    timeout=1.5)

Will run /tmp/myApp -a -b -c /tmp/tempdata.bin for evey mutation with timout of 1.5 seconds

post_test(test_num)
pre_test(test_num)