Update README.md

Spelling and formatting.
This commit is contained in:
Amal Murali
2019-01-06 19:49:35 +05:30
committed by GitHub
parent 039dec7e3a
commit e7b96b10d7

View File

@@ -1,5 +1,5 @@
# Interlace # Interlace
Easily turn single threaded command line applications into 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.
[![Python 3.2|3.6](https://img.shields.io/badge/python-3.2|3.6-green.svg)](https://www.python.org/) [![License](https://img.shields.io/badge/license-GPL3-_red.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Twitter](https://img.shields.io/badge/twitter-@codingo__-blue.svg)](https://twitter.com/codingo_) [![Twitter](https://img.shields.io/badge/twitter-@sml555__-blue.svg)](https://twitter.com/sml555_) [![Python 3.2|3.6](https://img.shields.io/badge/python-3.2|3.6-green.svg)](https://www.python.org/) [![License](https://img.shields.io/badge/license-GPL3-_red.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Twitter](https://img.shields.io/badge/twitter-@codingo__-blue.svg)](https://twitter.com/codingo_) [![Twitter](https://img.shields.io/badge/twitter-@sml555__-blue.svg)](https://twitter.com/sml555_)
@@ -15,18 +15,18 @@ Dependencies will then be installed and Interlace will be added to your path as
| Argument | Description | | Argument | Description |
|------------|--------------------------------------------------------------------------------------------------------------| |------------|--------------------------------------------------------------------------------------------------------------|
| -t | Specify a target or domain name either in comma 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 | | -tL | Specify a list of targets or domain names |
| -threads | Specify the maximum number of threads to run at any one time (DEFAULT:5) | | -threads | Specify the maximum number of threads to run at any one time (DEFAULT:5) |
| -timeout | Specify a timeout value in seconds for any one thread (DEFAULT:600) | | -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 | | -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 | | -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\_ | | -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 use dash notation | | -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 use dash notation |
| -rp | Specify a real port variable that can be used in commands as \_realport\_ | | -rp | Specify a real port variable that can be used in commands as \_realport\_ |
| --no-cidr | If set then CIDR notation in a target file will not be automatically be expanded into individual hosts. | | --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 | | --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. | | --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 | | -v | If set then verbose output will be displayed in the terminal |
## Further information regarding ports (-p) ## Further information regarding ports (-p)
@@ -38,22 +38,22 @@ Dependencies will then be installed and Interlace will be added to your path as
| 80,443 | Perform a command for both port 80, and port 443 | | 80,443 | Perform a command for both port 80, and port 443 |
## Further information regarding targets (-t or -tL) ## Further information regarding targets (-t or -tL)
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. 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.
# Variable Replacements # Variable Replacements
The following varaibles will be replaced in commands at runtime: The following variables will be replaced in commands at runtime:
| Variable | Replacement | | Variable | Replacement |
|-----------|-------------------------------------------------------------------------| |-----------|-------------------------------------------------------------------------|
| \_target\_ | Replaced with the expanded target list that the current thread is running against | | \_target\_ | Replaced with the expanded target list that the current thread is running against |
| \_host\_ | Works the same as \_target\_, can be used interchangably. | | \_host\_ | Works the same as \_target\_, can be used interchangeably |
| \_output\_ | Replaced with the output folder variable from interlace | | \_output\_ | Replaced with the output folder variable from interlace |
| \_port\_ | Replaced with the expanded port variable from interlace | | \_port\_ | Replaced with the expanded port variable from interlace |
| \_realport\_ | Replaced with the real port variable from interlace | | \_realport\_ | Replaced with the real port variable from interlace |
# Usage Examples # Usage Examples
## Run Nikto Over Multiple Sites ## Run Nikto Over Multiple Sites
Let's assume that you had a file `targets.txt` that had the following contents: Let's assume that you have a file `targets.txt` that has the following contents:
``` ```
bugcrowd.com bugcrowd.com
@@ -69,12 +69,12 @@ Interlace v1.0 by Michael Skelton (@codingo_)
[14:33:23] [THREAD] [nikto --host hackerone.com > ./hackerone.com-nikto.txt] Added to Queue [14:33:23] [THREAD] [nikto --host hackerone.com > ./hackerone.com-nikto.txt] Added to Queue
[14:33:23] [THREAD] [nikto --host bugcrowd.com > ./bugcrowd.com-nikto.txt] Added to Queue [14:33:23] [THREAD] [nikto --host bugcrowd.com > ./bugcrowd.com-nikto.txt] Added to Queue
``` ```
This would run nikto over each host and save to a file for each target. Note that in the above example since we're using the `>` operator so results won't be fed back to the terminal, however this is desired functionality as otherwise we wouldn't be able to attribute which target Nikto results were returning for. This would run Nikto over each host and save to a file for each target. Note that in the above example since we're using the `>` operator, the results won't be fed back to the terminal; however this is desired functionality as otherwise we wouldn't be able to attribute which target Nikto results were returning for.
For applications where you desire feedback simply pass commands as you normally would (or use `tee`). For applications where you desire feedback simply pass commands as you normally would (or use `tee`).
## Run Nikto Over Multiple Sites and Ports ## Run Nikto Over Multiple Sites and Ports
Using the above example, let's assume you want independant scans to be run for both ports `80` and `443` for the same targets. You would then use the following: Using the above example, let's assume you want independent scans to be run for both ports `80` and `443` for the same targets. You would then use the following:
``` ```
➜ /tmp interlace -tL ./targets.txt -threads 5 -c "nikto --host _target_:_port_ > ./_target_-_port_-nikto.txt" -p 80,443 -v ➜ /tmp interlace -tL ./targets.txt -threads 5 -c "nikto --host _target_:_port_ > ./_target_-_port_-nikto.txt" -p 80,443 -v
@@ -101,9 +101,9 @@ interlace -t example.com -o ~/Engagements/example/ -cL ./commands.txt -p 80,443
This would then run nikto, sslscan, and testssl.sh for both port 80 and 443 against example.com and save files into your engagements folder. This would then run nikto, sslscan, and testssl.sh for both port 80 and 443 against example.com and save files into your engagements folder.
## CIDR notation with an application that doesn't support it ## CIDR notation with an application that doesn't support it
Interlace automatically expands CIDR notation when starting threads (unless the --no-cidr flag is passed). This allows you to pass CIDR notation to a variety of applications: Interlace automatically expands CIDR notation when starting threads (unless the `--no-cidr` flag is passed). This allows you to pass CIDR notation to a variety of applications:
To run a virtual host scan against every target within 192.168.12.0/24 using a direct command you could use: To run a virtual host scan against every target within `192.168.12.0/24` using a direct command you could use:
```bash ```bash
interlace -t 192.168.12.0/24 -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50 interlace -t 192.168.12.0/24 -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50
``` ```
@@ -112,14 +112,14 @@ This is despite VHostScan not having any inbuilt CIDR notation support. Since In
## Glob notation with an application that doesn't support it ## Glob notation with an application that doesn't support it
Interlace automatically expands glob ranges when starting threads. This allows you to pass glob ranges to a variety of applications: Interlace automatically expands glob ranges when starting threads. This allows you to pass glob ranges to a variety of applications:
To run a virtual host scan against every target within 192.168.12.* using a direct command you could use: To run a virtual host scan against every target within `192.168.12.*` using a direct command you could use:
```bash ```bash
interlace -t 192.168.12.* -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50 interlace -t 192.168.12.* -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50
``` ```
Yet again, VHostScan does not having any inbuilt glob range format support. Yet again, VHostScan does not have any inbuilt glob range format support.
## Threading Support for an application that doesn't support it ## Threading Support for an application that doesn't support it
Run a [virtual host scan](https://github.com/codingo/VHostScan) against each host in a file (target-lst.txt), whilst also limiting scans at any one time to 50 maximum threads. Run a [virtual host scan](https://github.com/codingo/VHostScan) against each host in a file (`target-lst.txt`), whilst also limiting scans at any one time to 50 maximum threads.
This could be done using a direct command: This could be done using a direct command:
```bash ```bash
@@ -130,14 +130,14 @@ Or, alternatively, to run the same command as above, but using a command file, t
```bash ```bash
interlace -cL ./vhosts-commands.txt -tL ./target-list.txt -threads 50 -o ~/scans interlace -cL ./vhosts-commands.txt -tL ./target-list.txt -threads 50 -o ~/scans
``` ```
This presumes that the contents of the command file is: This presumes that the content of the command file is:
``` ```
vhostscan -t $target -oN _output_/_target_-vhosts.txt vhostscan -t $target -oN _output_/_target_-vhosts.txt
``` ```
This would output a file for each target in the specified output folder. You could also run multiple commands simply by adding them into the command file. This would output a file for each target in the specified output folder. You could also run multiple commands simply by adding them into the command file.
# Auhors and Thanks # Authors and Thanks
Originally written by Michael Skelton ([codingo](https://twitter.com/codingo_)) and Sajeeb Lohani ([sml555](https://twitter.com/sml555_)) with help from Charelle Collett ([@Charcol0x89](https://twitter.com/Charcol0x89)) for threading refactoring and overall appraoch, and Luke Stephens ([hakluke](https://twitter.com/hakluke)) for testing and approach. Originally written by Michael Skelton ([codingo](https://twitter.com/codingo_)) and Sajeeb Lohani ([sml555](https://twitter.com/sml555_)) with help from Charelle Collett ([@Charcol0x89](https://twitter.com/Charcol0x89)) for threading refactoring and overall approach, and Luke Stephens ([hakluke](https://twitter.com/hakluke)) for testing and approach.
# Contributions # Contributions
Contributions to this project are very welcome. If you're a newcomer to open source and would like some help in doing so, feel free to reach out to me on twitter ([@codingo_](https://twitter.com/codingo_)) and I'll assist wherever I can. Contributions to this project are very welcome. If you're a newcomer to open source and would like some help in doing so, feel free to reach out to me on twitter ([@codingo_](https://twitter.com/codingo_)) and I'll assist wherever I can.