output:str,# Output PCAP file path. Used only if a single input file is specified.
random_range:int=1,# [Optional] Upper bound for random range (not included). Defaults to 1.
packet_numbers:list=None,# [Optional] List of indices, starting from 1, of packets to edit. If not specified, packets are randomly picked.
dry_run:bool=False# [Optional] If True, do not write output PCAP file(s).
)->None
```
The program produces new PCAP file with the same name as the input files,
but with the suffix `.edit`.
The output files will be placed in a directory called `edited`,
This function produces new, edited PCAP file(s).
If no output file is specified (for a single input file),
or if multiple input files are given,
the output file(s) will have the same name as the input file(s),
but with the suffix `.edit`,
and will be placed in a directory called `edited`,
in the same directory as the input files.
It will be created if it doesn't exist.
...
...
@@ -48,18 +51,6 @@ The log files will be placed in a directory called `logs`,
in the same directory as the input files.
It will be created if it doesn't exist.
### Positional arguments
*`pcap`: PCAP file(s) to edit
### Optional arguments
*`-h`, `--help`: show help message and exit
*`-o`, `--output`: output PCAP (and CSV) file path. Used only if a single input file is specified. Default: `edited/<input_pcap>.edit.pcap`
*`-r`, `--random-range`: upper bound for the random range, which will select for each packet if it will be edited or not. In practice, each packet will be edited with a probability of `1/r`. Must be a strictly positive integer. Default: `1` (edit all packets).
*`-n`, `--packet-number`: index of the packet to edit, starting from 1. Can be specified multiple times. If this is used, only the specified packets will be edited, and no random editing will be performed.
*`-d`, `--dry-run`: don't write the output PCAP file (but still write the CSV log file)