aboul3la / Sublist3r

Fast subdomains enumeration tool for penetration testers
GNU General Public License v2.0
9.9k stars 2.11k forks source link

What about officially providing a Docker image? #324

Open mlocati opened 3 years ago

mlocati commented 3 years ago

Provided we have a Dockerfile file like this:

FROM alpine:3.14

RUN \
    apk -U add py3-pip && \
    rm -rf /var/cache/apk/* && \
    ln -s /usr/bin/python3 /usr/bin/python && \
    wget -O - https://codeload.github.com/aboul3la/Sublist3r/tar.gz/refs/heads/master | tar xz -C /tmp && \
    mv /tmp/Sublist3r-* /etc/sublist3r && \
    pip config set global.cache-dir false && \
    pip install -r /etc/sublist3r/requirements.txt && \
    ln -s /etc/sublist3r/sublist3r.py /usr/local/bin/sublist3r

ENTRYPOINT ["sublist3r"]

We could:

  1. create an image tagged as sublist3r with
    $ docker build --tag sublist3r .
  2. run sublist3r simply with

    $ docker run --rm sublist3r --help
    usage: sublist3r [-h] -d DOMAIN [-b [BRUTEFORCE]] [-p PORTS] [-v [VERBOSE]] [-t THREADS] [-e ENGINES] [-o OUTPUT] [-n]
    
    OPTIONS:
     -h, --help            show this help message and exit
     -d DOMAIN, --domain DOMAIN
                           Domain name to enumerate it's subdomains
     -b [BRUTEFORCE], --bruteforce [BRUTEFORCE]
                           Enable the subbrute bruteforce module
     -p PORTS, --ports PORTS
                           Scan the found subdomains against specified tcp ports
     -v [VERBOSE], --verbose [VERBOSE]
                           Enable Verbosity and display results in realtime
     -t THREADS, --threads THREADS
                           Number of threads to use for subbrute bruteforce
     -e ENGINES, --engines ENGINES
                           Specify a comma-separated list of search engines
     -o OUTPUT, --output OUTPUT
                           Save the results to text file
     -n, --no-color        Output without color
    
    Example: python /usr/local/bin/sublist3r -d google.com