Skip to content

Control time interval between packets #11

@whartond

Description

@whartond

Add the ability to control the time interval between packets. Ideally, this could be set globally and automatically applied between each event declaration or it could be specified ad hoc to apply to individual flow declarations.

To have Flowsynth insert a static time interval between each event declaration for a flow, set it in the flow declaration; examples:

flow default tcp 192.168.179.228:19444 > 172.16.116.149:80 (tcp.initialize; timeinterval:1;);

flow default2 tcp 192.168.179.228:19445 > 172.16.116.149:80 (tcp.initialize; timeinterval:1s;);

flow default3 tcp 192.168.179.228:19446 > 172.16.116.149:80 (tcp.initialize; timeinterval:1000ms;);

The default unit would be seconds but could be specified explicitly with 's' or milliseconds specified with 'ms' after the digits.

To set between event declarations, the 'timeinterval' keyword could be specified by itself in an event declaration (in which case direction wouldn't matter) or in an event declaration with other directives. If the latter, then the time interval would apply after the event declaration in which it is defined (and after an automatically generated ACK, if applicable); examples:

default > (content:"GET\x20/\x20HTTP/1.1"; content:"\x0d\x0a\x0d\x0a"; );
default > (timeinterval:5; );
default < (content:"HTTP/1.1\x20200\x20OK"; content:"\x0d\x0aContent-Length: 0"; content:"\x0d\x0a\x0d\x0a"; );

default > (content:"GET\x20/\x20HTTP/1.1"; content:"\x0d\x0a\x0d\x0a"; timeinterval:5; );
default < (content:"HTTP/1.1\x20200\x20OK"; content:"\x0d\x0aContent-Length: 0"; content:"\x0d\x0a\x0d\x0a"; );

timeinterval values for specific event declarations would override a globally set (flow declaration) timeinterval for that event.

Scapy should let you modify the arrival time on an ethernet frame ('.time').

A PR for this should also include appropriate updates to the README.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions