
Easily turn single threaded command line applications into a fast, multi-threaded application with CIDR and glob support.
Easily turn single threaded command line applications into a fast, multi-threaded application with CIDR and glob support.
Install using:
$ python3 setup.py install
Dependencies will then be installed and Interlace will be added to your path as interlace.
| Argument | Description |
|---|---|
| (stdin) | Pipe target lists from another application in comma-delimited format, CIDR notation, or as an individual host |
| -t | Specify a target or domain name either in comma-delimited format, CIDR notation, or as an individual host |
| -tL | Specify a list of targets or domain names |
| -e | Specify a list of targets to exclude either in comma-delimited format, CIDR notation, or as an individual host |
| -eL | Specify a list of targets to exclude |
| -threads | Specify the maximum number of threads to run at any one time (DEFAULT:5) |
| -timeout | Specify a timeout value in seconds for any single thread (DEFAULT:600) |
| -c | Specify a single command to execute over each target or domain |
| -cL | Specify a list of commands to execute over each target or domain |
| -o | Specify an output folder variable that can be used in commands as _output_ |
| -p | Specify a list of port variable that can be used in commands as _port_. This can be a single port, a comma-delimited list, or a range using dash notation |
| -pL | Specify a list of proxies |
| --proto | Specify protocols that can be used in commands as _proto_ |
| -rp | Specify a real port variable that can be used in commands as _realport_ |
| -random | Specify a directory of files that can be randomly used in commands as _random_ |
| --no-bar / --sober | If set then progress bar be stripped out |
| --no-cidr | If set then CIDR notation in a target file will not be automatically be expanded into individual hosts |
| --no-color | If set then any foreground or background colours will be stripped out |
| --silent | If set then only important information will be displayed and banners and other information will be redacted |
| -v | If set then verbose output will be displayed in the terminal |
| Example | Notation Type |
|---|---|
| 80 | Single port |
| 1-80 | Dash notation, perform a command for each port from 1-80 |
| 80,443 | Perform a command for both port 80, and port 443 |
Both -t and -tL will be processed the same. You can pass targets the same as you would when using nmap. This can be done using CIDR notation, dash notation, or a comma-delimited list of targets. A single target list file can also use different notation types per line.
Alternatively, you can pass targets in via STDIN and neither -t or -tL will be required.
The following variables will be replaced in commands at runtime:
| Variable | Replacement |
|---|---|
| _target_ | Replaced with the expanded target list that the current thread is running against |
| _cleantarget_ | Replaced with target cleaned from http:// or https:// |
| _safe-target_ | Replaced with target automatically quoting for commands, stopping subcommands running |
| _host_ | Works the same as _target_, and can be used interchangeably |
| _output_ | Replaced with the output folder variable from Interlace |
| _port_ | Replaced with the expanded port variable from Interlace |
| _realport_ | Replaced with the real port variable from Interlace |
| _proxy_ | Replaced with the proxy list from Interlace |
| _random_ | Replaced with the randomly chosen file from Interlace |
Interlace also makes the use of two additional features for controlling execution flow within a command file: _blocker_ and _block:<name>_. Blockers prevent execution of commands listed after them, until all commands before them have completed, and blocks can be used to force sequential execution of commands listed within a block, for a target.
These are run on a per-target level. If there are threads available and a blocker is in the way for the current target, Interlace will start commands from the next target within a target list in order to maximise efficiency.
Using these features will allow you to control the execution flow for individual targets more directly in order to prevent commands from running out of order.
Blockers prevent anything below them from executing until all commands above them have completed (for the currently active host). For example, in the following:
mkdir -p _output_/_target_/scans/
_blocker_
nmap _target_ -oA _output_/_target_/scans/_target_-nmap