Easily turn single threaded command line applications into a fast, multi-threaded application with CIDR and glob support.

Overview

Interlace

Easily turn single threaded command line applications into a fast, multi-threaded application with CIDR and glob support.

Python 3.2|3.6 License Twitter Twitter

Reviews / Howto Guides

Interlace: A Tool to Easily Automate and Multithread Your Pentesting & Bug Bounty Workflow Without Any Coding

Table of Contents

Setup

Install using:

$ python3 setup.py install

Dependencies will then be installed and Interlace will be added to your path as interlace.

Usage

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

Further information regarding ports

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

Further information regarding targets

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.

Variable Replacements

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 cleanded from http:// or https://
_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

Advanced Command File Usage

Interlace also makes the use of two additional features for controlling execution flow within a command file: _blocker_ and _block:_. 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.

Blocker

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

The use of a blocker here prevents nmap from running on a target before the base folder structure has been created, preventing nmap from throwing an exception.

Blocks

Blocks force everything within them to run sequentially. You can also use multiple blocks per command file. For example, in the following:

_block:nmap_
mkdir -p _target_/output/scans/
nmap _target_ -oN _target_/output/scans/_target_-nmap
_block:nmap_
nikto --host _target_

In this example, the block would run the same as before, but assuming the thread count is high enough then nikto would begin to run immediately, passing results back to the terminal (whilst nmap and file creation happened in the background).

Usage Examples

Run Nikto Over Multiple Sites

Let's assume that you have a file targets.txt that has the following contents:

bugcrowd.com
hackerone.com

You could use Interlace to run over any number of targets within this file using: bash

./_target_-nikto.txt" -v ========================================================================= Interlace v1.0 by Michael Skelton (@codingo_) & Sajeeb Lohani (@sml555_) ========================================================================= [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 ">
➜  /tmp interlace -tL ./targets.txt -threads 5 -c "nikto --host _target_ > ./_target_-nikto.txt" -v
=========================================================================
Interlace v1.0	by Michael Skelton (@codingo_) & Sajeeb Lohani (@sml555_)
=========================================================================
[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 

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).

Run Nikto Over Multiple Sites and Ports

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:

./_target_-_port_-nikto.txt" -p 80,443 -v ========================================================================= Interlace v1.0 by Michael Skelton (@codingo_) & Sajeeb Lohani (@sml555_) ========================================================================= [14:33:23] [THREAD] [nikto --host hackerone.com:80 > ./hackerone.com-nikto.txt] Added to Queue [14:33:23] [THREAD] [nikto --host bugcrowd.com:80 > ./hackerone.com-nikto.txt] Added to Queue [14:33:23] [THREAD] [nikto --host bugcrowd.com:443 > ./bugcrowd.com-nikto.txt] Added to Queue [14:33:23] [THREAD] [nikto --host hackerone.com:443 > ./hackerone.com-nikto.txt] Added to Queue ">
➜  /tmp interlace -tL ./targets.txt -threads 5 -c "nikto --host _target_:_port_ > ./_target_-_port_-nikto.txt" -p 80,443 -v
=========================================================================
Interlace v1.0	by Michael Skelton (@codingo_) & Sajeeb Lohani (@sml555_)
=========================================================================
[14:33:23] [THREAD] [nikto --host hackerone.com:80 > ./hackerone.com-nikto.txt] Added to Queue 
[14:33:23] [THREAD] [nikto --host bugcrowd.com:80 > ./hackerone.com-nikto.txt] Added to Queue 
[14:33:23] [THREAD] [nikto --host bugcrowd.com:443 > ./bugcrowd.com-nikto.txt] Added to Queue 
[14:33:23] [THREAD] [nikto --host hackerone.com:443 > ./hackerone.com-nikto.txt] Added to Queue 

Run a List of Commands against Target Hosts

Often with penetration tests, there's a list of commands you want to run on nearly every job. Assuming that list includes testssl.sh, nikto, and sslscan, you could save a command list with the following in a file called commands.txt:

nikto --host _target_:_port_ > _output_/_target_-nikto.txt
sslscan _target_:_port_ >  _output_/_target_-sslscan.txt
testssl.sh _target_:_port_ > _output_/_target_-testssl.txt

If you were then given a target example.com, you could run each of these commands against this target using the following:

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 the files into your engagements folder.

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:

To run a virtual host scan against every target within 192.168.12.0/24 using a direct command you could use:

interlace -t 192.168.12.0/24 -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50

This is despite VHostScan not having any in-built CIDR notation support. Since Interlace expands the notation before building a queue of threads, VHostScan for all intents is only receiving a list of direct IP addresses to scan.

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:

To run a virtual host scan against every target within 192.168.12.* using a direct command you could use:

interlace -t 192.168.12.* -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50

Yet again, VHostScan does not have any inbuilt glob range format support.

Dash (-) notation with an application that doesn't support it

Interlace automatically expands dash 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.1-15 using a direct command you could use:

interlace -t 192.168.12.1-15 -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50

Yet again, VHostScan does not have any inbuilt dash range format support.

Threading Support for an application that doesn't support it

Run a virtual host scan 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:

interlace -tL ./target-list.txt -c "vhostscan -t _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50

Or, alternatively, to run the same command as above, but using a command file:

interlace -cL ./vhosts-commands.txt -tL ./target-list.txt -threads 50 -o ~/scans

This presumes that the content of the command file is:

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.

Exclusions

Interlace automatically excludes any hosts provided when specified via the -e or -eL arguments. These arguments are also compatible with the range notations mentioned above (CIDR, glob, and dash)

To run a virtual host scan against every target in the CIDR range 192.168.12.0/24 but not for the targets in the range 192.168.12.0/26, using a direct command, you could use:

interlace -t 192.168.12.0/24 -e 192.168.12.0/26 -c "vhostscan _target_ -oN _output_/_target_-vhosts.txt" -o ~/scans/ -threads 50

Run Nikto Using Multiple Proxies

Using the above example, let's assume you want independent scans to be via different proxies for the same targets. You would then use the following:

./_target_-_port_-nikto.txt" -p 80,443 -v ">
➜  /tmp interlace -tL ./targets.txt -pL ./proxies.txt -threads 5 -c "nikto --host _target_:_port_ -useproxy _proxy_ > ./_target_-_port_-nikto.txt" -p 80,443 -v

Authors and Thanks

Originally written by Michael Skelton (codingo) and Sajeeb Lohani (sml555) with help from Charelle Collett (@Charcol0x89) for threading refactoring and overall approach, and Luke Stephens (hakluke) for testing and approach.

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 us on Twitter (@codingo_) / (@sml555_) and we'll assist wherever we can.

Comments
  • Out of memory issue

    Out of memory issue

    When large input is passed to interlace (like 100k subdomains or a /8 CIDR), interlace will try to perform the operations of replacing the commands, but will fail miserably due to the limited amount of memory and not so great storage method (all in RAM).

    Basically we need a solution which doesn't run out of memory when receiving 100k targets.

    bug 
    opened by prodigysml 17
  • tool: testssl issues with file output flags

    tool: testssl issues with file output flags

    Issue Interlace is unable to complete testssl if one of the output flags are used for the tool (html/log/all etc). Not 100% this is an interlace issue, but the output when using testssl on it's own works, this behaviour is only encountered when used with Interlace.

    Error Encountered

    testssl: line 492: printf: write error: Broken pipe
    

    Versions used

    • Interlace - Fresh clone from here, 10th August 2019.
    • Testssl - Latest master branch clone, 10th August 2019.

    Commands used to replicate

    # When used as a single command
    interlace -tL target_list.txt -c "testssl -E --warnings batch --quiet --outprefix "ciphers-" -oA ssl/testssl/ _target_" --silent
    
    # When used as part of a command list
    interlace -tL target_list.txt -o /path/to/directory/ -cL interlace_commands.txt
    # Relevant lines from interlace_commands.txt
    testssl -E --color=3 --htmlfile=ssl/testssl/ciphers._target_.html https://_target_
    testssl --color=3 --htmlfile=ssl/testssl/full._target_.html https://_target_
    

    Environment

    • Linux Mint 19 Tara
    • Not running with sudo/root
    • Have permission to write to target folders and folders exist
    bug 
    opened by fullstackpotato 14
  • Support for Python 3.7?

    Support for Python 3.7?

    Does this project support Python 3.7? python setup.py install is failing for me in a fresh 3.7.1. venv:

    $ python setup.py install
    Running from numpy source directory.
    /tmp/easy_install-i32nmnz2/numpy-1.12.0/setup.py:366: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      run_build = parse_setuppy_commands()
    /tmp/easy_install-i32nmnz2/numpy-1.12.0/numpy/distutils/system_info.py:572: UserWarning: 
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    /tmp/easy_install-i32nmnz2/numpy-1.12.0/numpy/distutils/system_info.py:572: UserWarning: 
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.
      self.calc_info()
    /tmp/easy_install-i32nmnz2/numpy-1.12.0/numpy/distutils/system_info.py:572: UserWarning: 
        Blas (http://www.netlib.org/blas/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [blas_src]) or by setting
        the BLAS_SRC environment variable.
      self.calc_info()
    non-existing path in 'numpy/distutils': 'site.cfg'
    /tmp/easy_install-i32nmnz2/numpy-1.12.0/numpy/distutils/system_info.py:572: UserWarning: 
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    /tmp/easy_install-i32nmnz2/numpy-1.12.0/numpy/distutils/system_info.py:572: UserWarning: 
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
    /usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
      warnings.warn(msg)
    Could not locate executable gfortran
    Could not locate executable f95
    Could not locate executable ifort
    Could not locate executable ifc
    Could not locate executable lf95
    Could not locate executable pgfortran
    Could not locate executable f90
    Could not locate executable f77
    Could not locate executable fort
    Could not locate executable efort
    Could not locate executable efc
    Could not locate executable g77
    Could not locate executable g95
    Could not locate executable pathf95
    don't know how to compile Fortran code on platform 'posix'
    [...]
    

    Thanks!

    question 
    opened by njfox 14
  • Multithreading does not work on OSX

    Multithreading does not work on OSX

    Hi,

    When I run like Interlace like this:

    interlace -tL targets.txt -threads 20 -c "dirsearch -u _target_ -t 30 -e '' -w wordlist.txt > results.txt" -v
    

    It feels more like:

    while read target; do dirsearch [args] > output.txt; done < targets.txt
    

    It seems to run everything sequentially. @hakluke confirms that he also faced the same issue.

    opened by amalmurali47 11
  • _cleantarget_ generates too many commands

    _cleantarget_ generates too many commands

    I wanted to scan a list of CIDR IPs from a text file. I had trouble saving the output of each command to a text file. For example

    interlace -tL cidr.txt --no-cidr -c "amass enum -cidr target >> target.txt"

    does not work because of the "/" in the output file. While looking through the source code I found cleantarget as variable. so I thought

    interlace -tL cidr.txt --no-cidr -c "amass enum -cidr target >> cleantarget.txt"

    has to work. Idk if cleantarget is supported because it is not mentioned in the documentation. But the problem here is that when I run the command with cleantarget Interlace does not create x (x = number of lines in cidr.txt) commands but x*x commands (for example 64 instead of 8 commands).

    I think the problem is that in the function _process_clean_targets every dirty_target gets replaced every time for every command, instead of replacing only the 1 dirty_target of that 1 command. So the loop is executed to many times. It works without cleantarget because you always check in the function add_task if the task is already in the list. But even for the else condition the "add_task(command, tasks, temp)" function gets called as many times as dirty_target exists instead of only once.

    opened by Smismi11 10
  • issue

    issue

    updating: ['11046'] updating: ['97'] Traceback (most recent call last): File "/usr/local/bin/interlace", line 11, in load_entry_point('Interlace==1.9.5', 'console_scripts', 'interlace')() File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.5-py3.8.egg/Interlace/interlace.py", line 36, in main File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.5-py3.8.egg/Interlace/lib/threader.py", line 101, in init File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.5-py3.8.egg/Interlace/interlace.py", line 11, in task_queue_generator_func File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.5-py3.8.egg/Interlace/lib/core/input.py", line 258, in process_data_for_tasks_iterator File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.5-py3.8.egg/Interlace/lib/core/input.py", line 218, in _process_targets File "/usr/local/lib/python3.8/dist-packages/Interlace-1.9.5-py3.8.egg/Interlace/lib/core/input.py", line 195, in parse_and_group_target_specs IndexError: string index out of range

    wontfix 
    opened by knowthetech 9
  • _cleantarget_

    _cleantarget_

    I'm unsure if this will be the final variable name but as stated in #63, slashes do break the piping of the file.

    Since targets could take the following forms:

    https://example.com/
    https://example.com
    https://example.com/dashboard
    https://example.com/dashboard/
    

    The proposal is to have a variable _cleantarget_. This will print the contents of _target_ but will remove https://, http://, any trailing / and then replace any remaining / with -. This should allow this to be used to generate output filenames, even when URL's to specific locations are added.

    This should help to close out #63 as well as aid in cases such as #54.

    enhancement 
    opened by codingo 9
  • Interlace hangs with large amount of IPs in a file

    Interlace hangs with large amount of IPs in a file

    Get 50,000 random IPs from https://onlinerandomtools.com/generate-random-ip and save to file named ips.txt The following command hangs and never starts. CPU is maxed out. From what I can tell, this bug only impacts IPs in a list. For example: interlace -tL ips.txt -c "echo _target_ " -threads 5

    Attempting with hostnames instead of IPs works as expected and is successful, example interlace -tL subdomains.txt -c "echo _target_ " -threads 5 (download hostnames from a target with more than 50k subdomains from https://chaos.projectdiscovery.io/#/). Attempting with CIDR expansion works as expected and is successful, example interlace -t 10.0.0.0/16 -c "echo _target_ " -threads 5

    I've tried with Ubuntu 20.04 and Kali 2020.4.

    opened by 0xtavian 8
  • Interlace not executing command associated with -c flag

    Interlace not executing command associated with -c flag

    $ interlace -tL target.txt -threads 3 -c "echo 'Scanning _target_ Now'" -v
    =====================================================
    Interlace v1.8.0	by Michael Skelton (@codingo_)
                      	& Sajeeb Lohani (@sml555_)
    =====================================================
    [20:46:03] [THREAD] [echo 'Scanning https://pandao.ru/js/jquery-3.2.1.min.js Now'] Added to Queue 
    [20:46:03] [THREAD] [echo 'Scanning https://pandao.ru/gtm.js Now'] Added to Queue 
    [20:46:03] [THREAD] [echo 'Scanning https://pandao.ru/js/jquery.magnific-popup.min.js Now'] Added to Queue 
    [20:46:03] [THREAD] [echo 'Scanning https://pandao.ru/js/jquery.min.js Now'] Added to Queue 
    Generated 4 commands in total
    Repeat set to 1
     75%|████████████████████████████████▎          | 3/4 [00:00<00:00, 311.06it/s]
    

    where target.txt contains:

    https://pandao.ru/gtm.js
    https://pandao.ru/gtm.js
    https://pandao.ru/js/jquery-3.2.1.min.js
    https://pandao.ru/js/jquery-3.2.1.min.js
    https://pandao.ru/js/jquery.magnific-popup.min.js
    https://pandao.ru/js/jquery.magnific-popup.min.js
    https://pandao.ru/js/jquery.min.js
    

    The above command with interlace does not execute the shell command as show in the snippet.

    Any help would be appreciated.

    Thanks,

    opened by tarunkant 8
  • TypeError occurs when using dash notation to specify ports

    TypeError occurs when using dash notation to specify ports

    Description:

    Latest build seems to have a bug with supporting dash notation.

    Steps to reproduce:
    1. pull latest and install
    2. attempt to use a command with dash notation
    echo 127.0.0.1 > targets.txt
    interlace -tL ./targets.txt -p 80-81 -c 'nmap _target_ -p _port_'
    
    Example

    The output below shows a successful install; comma-delimited port command succeeding; followed by a dash notation command failing

    [~]$ git clone https://github.com/codingo/Interlace
    Cloning into 'Interlace'...
    remote: Enumerating objects: 149, done.
    remote: Counting objects: 100% (149/149), done.
    remote: Compressing objects: 100% (107/107), done.
    remote: Total 1200 (delta 68), reused 66 (delta 33), pack-reused 1051
    Receiving objects: 100% (1200/1200), 248.28 KiB | 426.00 KiB/s, done.
    Resolving deltas: 100% (657/657), done.
    [~]$ cd Interlace 
    [master][~/Interlace]$ sudo python3 setup.py install                
    running install                                                     
    running install_lib                      
    ...Snip...
    Using /usr/local/lib/python3.7/site-packages/colorclass-2.2.0-py3.7.egg
    Finished processing dependencies for Interlace==1.8.0
    [master][~/Interlace]$ echo 127.0.0.1 > targets.txt 
    *[master][~/Interlace]$ interlace -tL ./targets.txt -p 80 -c 'nmap _target_ -p _port_'
    =====================================================
    Interlace v1.8.0        by Michael Skelton (@codingo_)
                            & Sajeeb Lohani (@sml555_)
    =====================================================
    [19:53:52] [THREAD] [nmap 127.0.0.1 -p 80] Added to Queue 
    Generated 1 commands in total
    Repeat set to 1
    Starting Nmap 7.70 ( https://nmap.org ) at 2020-04-17 19:53 AEST                                                                                                                                                                              
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.00016s latency).
    
    PORT   STATE  SERVICE
    80/tcp closed http
    
    Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
    
    100%|██████████████████████████████████████████████████████████████
    *[master][~/Interlace]$ interlace -tL ./targets.txt -p 80-81 -c 'nmap _target_ -p _port_'
    =====================================================
    Interlace v1.8.0        by Michael Skelton (@codingo_)
                            & Sajeeb Lohani (@sml555_)
    =====================================================
    Traceback (most recent call last):
      File "/usr/local/bin/interlace", line 11, in <module>
        load_entry_point('Interlace==1.8.0', 'console_scripts', 'interlace')()
      File "/usr/local/lib/python3.7/site-packages/Interlace-1.8.0-py3.7.egg/Interlace/interlace.py", line 32, in main
      File "/usr/local/lib/python3.7/site-packages/Interlace-1.8.0-py3.7.egg/Interlace/interlace.py", line 11, in build_queue
      File "/usr/local/lib/python3.7/site-packages/Interlace-1.8.0-py3.7.egg/Interlace/lib/core/input.py", line 289, in process_commands
      File "/usr/local/lib/python3.7/site-packages/Interlace-1.8.0-py3.7.egg/Interlace/lib/core/input.py", line 214, in _replace_variable_with_commands
      File "/usr/local/lib/python3.7/site-packages/Interlace-1.8.0-py3.7.egg/Interlace/lib/threader.py", line 27, in replace
    TypeError: replace() argument 2 must be str, not int
    
    
    
    bug 
    opened by lystena 8
  • _port_ doesn't seem to convert to a port when passing in a port list

    _port_ doesn't seem to convert to a port when passing in a port list

    I ran the script with the settings as described to use nikto and have this error, it seems to not be converting port into the port number;

    • Nikto v2.1.6

    • No web server found on www.example.com:port

    • 0 host(s) tested
    bug 
    opened by mrpaulstone 7
  • Multithreading doesn't work on Windows

    Multithreading doesn't work on Windows

    On Widows OS tasks are executed in a serialized way

    interlace -t a,b,c -c "timeout /t 10 & echo _target_"
    =====================================================
    Interlace v1.9.6        by Michael Skelton (@codingo_)
                            & Sajeeb Lohani (@sml555_)
    =====================================================
      0%|                                                                                            | 0/3 [00:00<?, ?it/s][13:34:29] [THREAD] [timeout /t 10 & echo a] Added to Queue
    
    Waiting for 10 seconds, press a key to continue . 0
    a
    
     33%|████████████████████████████                                                        | 1/3 [00:09<00:19,  9.71s/it][13:34:39] [THREAD] [timeout /t 10 & echo c] Added to Queue
    
    Waiting for 10 seconds, press a key to continue . 0
    c
    
     67%|████████████████████████████████████████████████████████                            | 2/3 [00:19<00:04,  4.85s/it][13:34:49] [THREAD] [timeout /t 10 & echo b] Added to Queue
    
    Waiting for 10 seconds, press a key to continue . 0
    b
    
    100%|████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:29<00:00,  9.92s/it]
    
    opened by mkey-hu 0
  • Interlace parsing break when encountered with comma

    Interlace parsing break when encountered with comma

    Hello, I noticed that Interlace could not parse URLs when it contains commas.

    Example test file:

    http://example.com/eName,p=123?l.host+l.path=123
    http://example.com/eNamep=123,asds&asd1=asd,asddd
    

    Command:

    interlace -tL test -c 'echo "_host_"'
    

    Output:

    http://example.com/eNamep=123                                                   
    p=123?l.host+l.path=123                                                         
    asds&asd1=asd                                                                   
    http://example.com/eName                                                        
    asddd  
    

    Expected Output:

    http://example.com/eName,p=123?l.host+l.path=123
    http://example.com/eNamep=123,asds&asd1=asd,asddd
    
    opened by tarunkant 0
  • Python Error while running

    Python Error while running

    Getting this error while running interlace

      File "/usr/local/bin/interlace", line 33, in <module>
        sys.exit(load_entry_point('Interlace==1.9.6', 'console_scripts', 'interlace')())
      File "/usr/local/lib/python3.9/dist-packages/Interlace-1.9.6-py3.9.egg/Interlace/interlace.py", line 24, in main
      File "/usr/local/lib/python3.9/dist-packages/Interlace-1.9.6-py3.9.egg/Interlace/lib/core/input.py", line 381, in parse
      File "/usr/lib/python3.9/argparse.py", line 1830, in parse_args
        args, argv = self.parse_known_args(args, namespace)
      File "/usr/lib/python3.9/argparse.py", line 1863, in parse_known_args
        namespace, args = self._parse_known_args(args, namespace)
      File "/usr/lib/python3.9/argparse.py", line 2072, in _parse_known_args
        start_index = consume_optional(start_index)
      File "/usr/lib/python3.9/argparse.py", line 2012, in consume_optional
        take_action(action, args, option_string)
      File "/usr/lib/python3.9/argparse.py", line 1924, in take_action
        argument_values = self._get_values(action, argument_strings)
      File "/usr/lib/python3.9/argparse.py", line 2455, in _get_values
        value = self._get_value(action, arg_string)
      File "/usr/lib/python3.9/argparse.py", line 2488, in _get_value
        result = type_func(arg_string)
      File "/usr/local/lib/python3.9/dist-packages/Interlace-1.9.6-py3.9.egg/Interlace/lib/core/input.py", line 427, in <lambda>
      File "/usr/local/lib/python3.9/dist-packages/Interlace-1.9.6-py3.9.egg/Interlace/lib/core/input.py", line 33, in check_positive
    AttributeError: 'ArgumentParser' object has no attribute 'ArgumentTypeError'
    

    any suggestions to fix this will be appreciated

    └──╼ $python --version
    Python 3.9.2
    
    
    opened by rasiras 1
  • Interlace dont like latest python

    Interlace dont like latest python

    Not sure if it likes new version of python

    uname -a 
    Linux kali 5.16.0-kali7-amd64 #1 SMP PREEMPT Debian 5.16.18-1kali1 (2022-04-01) x86_64 GNU/Linux
    
    python3 --version       
    Python 3.10.4
    

    Steps to replicate

    Literally git clone this repo

    cd Interlace  
    python3 setup.py install 
    

    when i try to then load interlace it dies

    python3 interlace.py
    
    Traceback (most recent call last):
      File "/usr/local/bin/interlace", line 33, in <module>
        sys.exit(load_entry_point('Interlace==1.9.6', 'console_scripts', 'interlace')())
      File "/usr/local/bin/interlace", line 25, in importlib_load_entry_point
        return next(matches).load()
      File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
        module = import_module(match.group('module'))
      File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/usr/local/lib/python3.10/dist-packages/Interlace-1.9.6-py3.10.egg/Interlace/interlace.py", line 6, in <module>
      File "/usr/local/lib/python3.10/dist-packages/Interlace-1.9.6-py3.10.egg/Interlace/lib/core/output.py", line 4, in <module>
      File "/usr/local/lib/python3.10/dist-packages/colorclass-2.2.0-py3.10.egg/colorclass/__init__.py", line 11, in <module>
      File "/usr/local/lib/python3.10/dist-packages/colorclass-2.2.0-py3.10.egg/colorclass/codes.py", line 4, in <module>
    ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
    

    any ideas what im doing wrong here. i have reverted snapshot and tried on a fresh kali vm but no go. seems like interlace dont play ball with the latest python

    opened by shifty0g 5
  • Installation errors on Mac

    Installation errors on Mac

    Hello,

    Does anyone know why I get this error and can't install it?

    Thanks

    python3 setup.py install

    Traceback (most recent call last):
      File "setup.py", line 19, in <module>
        setup(
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
        _install_setup_requires(attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
        dist = MinimalDistribution(attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 57, in __init__
        super().__init__(filtered)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 460, in __init__
        for ep in metadata.entry_points(group='distutils.setup_keywords'):
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 999, in entry_points
        return SelectableGroups.load(eps).select(**params)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 449, in load
        ordered = sorted(eps, key=by_group)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 996, in <genexpr>
        eps = itertools.chain.from_iterable(
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py", line 16, in unique_everseen
        k = key(element)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 931, in _normalized_name
        return self._name_from_stem(stem) or super()._normalized_name
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 600, in _normalized_name
        return Prepared.normalize(self.name)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 855, in normalize
        return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/re.py", line 210, in sub
        return _compile(pattern, flags).sub(repl, string, count)
    TypeError: expected string or bytes-like object
    
    wontfix 
    opened by Teicu 2
Releases(1.6)
  • 1.6(Aug 19, 2019)

    New Features and Improvements

    • Introduced _random_ in #58
    • Introduced _blocker_ and _block:xyz_ in #60

    Bug Fixes

    • Fix Arguments.output bug introduced in #57 in #61
    • Permissions issues bugfix in #57
    • Fixed bug with long commands and de-duplication in #49
    • Various progress bar bugfixes in #45
    Source code(tar.gz)
    Source code(zip)
  • 1.5.1(Jun 4, 2019)

    New Features and Improvements

    • Added progress bar in #42
    • Added Proxy List support in #40
    • Refactor for speed improvements over exceptionally large lists in #30

    Bug Fixes

    • Fix Case-sensitive file calls on subprocess.call() in #38
    • Fix character stripping bug in #33
    • Fix progress bar not sticking to terminal in #44
    Source code(tar.gz)
    Source code(zip)
  • 1.3.5(Apr 30, 2019)

  • 1.3.4(Apr 12, 2019)

    New Features and Improvements

    • Added Stdin Support in #22
    • Added _proto_ variable in #23
    • Significant speed improvements with very large lists in #30

    Bug Fixes

    • Fixed empty port, exclusion or domain name throwing exception in #18
    • Fixed empty target list bug in #35
    • Fixed broken setup when client only using Python 3.7 in #21
    • Added checks for output folder existence in #23
    • Fixed realports replacement not consistently working in #27
    • Removed [thread] outputs when -silent flag is used in #29
    • Fixed trimmed spaces bug in #33
    Source code(tar.gz)
    Source code(zip)
  • 1.1(Jan 9, 2019)

  • 1.0(Jan 6, 2019)

Owner
Michael Skelton
Senior Director of Security Operations @ Bugcrowd
Michael Skelton
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 17 Dec 11, 2022
Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications.

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments brought about by the failure to execute a CLI API. Simple to code, easy to learn, and does not come with needless baggage.

Secretum Inc. 16 Oct 15, 2022
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Dec 30, 2022
split-manga-pages: a command line utility written in Python that converts your double-page layout manga to single-page layout.

split-manga-pages split-manga-pages is a command line utility written in Python that converts your double-page layout manga (or any images in double p

Christoffer Aakre 3 May 24, 2022
WA Terminal is a CLI application that allows us to login and send message with WhatsApp with a single command.

WA Terminal is a CLI application that allows us to login and send message with WhatsApp with a single command.

Aziz Fikri 15 Apr 15, 2022
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

null 37 Dec 15, 2022
Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process of them.

Task Manager Automation Tool (TMAT) CLI Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process

Tiamat 5 Apr 12, 2022
OneDriveExplorer - A command line and GUI based application for reconstructing the folder structure of OneDrive from the UserCid.dat file

OneDriveExplorer - A command line and GUI based application for reconstructing the folder structure of OneDrive from the UserCid.dat file

Brian Maloney 100 Dec 13, 2022
Python Command Line Application (CLI) using Typer, SQLModel, Async-PostgrSQL, and FastAPI

pyflycli is a command-line interface application built with Typer that allows you to view flights above your location.

Kevin Zehnder 14 Oct 1, 2022
Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's

Phishing-Detective Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's How it works A simpl

null 2 Jun 23, 2022
Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Website

?? rover Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Websit

Saketha Ramanjam 4 Jan 19, 2022
A command line application, written in Python, for interacting with Spotify.

spotify-py-cli A command line application, written in Python, for interacting with Spotify. The primary purpose behind developing this app was to gain

Drew Loukusa 0 Oct 7, 2021
jrnl is a simple journal application for the command line.

jrnl To get help, submit an issue on Github. jrnl is a simple journal application for the command line. You can use it to easily create, search, and v

jrnl 5.7k Dec 31, 2022
Shazam is a Command Line Application that checks the integrity of the file by comparing it with a given hash.

SHAZAM - Check the file's integrity Shazam is a Command Line Application that checks the integrity of the file by comparing it with a given hash. Crea

Anaxímeno Brito 1 Aug 21, 2022
A command line application to analyse reports from TBC Warcraft Logs.

README A command line application to analyse reports from TBC Warcraft Logs. The application was written and tested with Python 3.9. Features Dumps an

null 2 Dec 17, 2021
This is a simple Termo application in command line style

my-termo This is a simple Termo application in command line style. This app run a Linux crontab task every day to get a new word. Type termo in your t

Gustavo Soares 1 Feb 14, 2022
Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juan Carlos Juárez 1 Feb 2, 2022
Borderless-Window-Utility - Modifies window style to force most applications into a borderless windowed mode

Borderless-Window-Utility Modifies window style to force most applications into

null 8 Oct 22, 2022