Home

Awesome

Intoduction to dizzy

Structure of .dizz files

A single packet is described by a so called .dizz file. Some example files can be found in the dizzfiles repository. These files are Python code, so they have to be written in proper Python syntax. They consist of three variables which need to be defined. The first variable is the name of the packet:

name = "test"

The second variable is called objects and describes the packet fields. It's a Python list with all the fields listed:

objects = [
    ...
]

Inside of that list you can use some pre-defined functions which generate the actual data during parsing. the functions are called field(), list(), rand() and link(). they take different arguments, as listed below:

The third variable is called functions and it is also a Python list. It represents a set of functions that are called against the generated raw packet, before it is sent out. Currently the functions length(), lambda_legth(), csum(), lambda_csum() and lambda2_csum() are available.

Note: There are some weird looking .dizz files, which are auto-generated from an old dizzy version. They are working and will be replaced by more readable ones in the future.

Structure of .act files

Once you want to get stateful, you need to write interaction in .act files. These file are Python code as well. they also got 3 variables, name for the name of the interaction [a string], objects which is a Python list of dizzes (you can use a pre-defined function here as well) and functions, which also is a Python list.

There is a functions variable as well, which contains either copy() or adv_copy() functions: