From fa87846e72b07ebd9043d5dbd4ce38c7e3c439c4 Mon Sep 17 00:00:00 2001 From: Paolo Smiraglia Date: Wed, 12 Jun 2019 11:54:50 +0200 Subject: [PATCH 1/2] Add Docker image --- Dockerfile | 9 +++++++++ requirements.txt | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d3c7428 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:2-stretch + +WORKDIR /src/app +COPY ./requirements.txt . +RUN pip install -r requirements.txt +COPY . . +RUN chmod +x ./knockpy/knockpy.py + +ENTRYPOINT ["/src/app/knockpy/knockpy.py"] diff --git a/requirements.txt b/requirements.txt index 52a3fe2..2f73596 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -python-dnspython +dnspython From bb35e30e37a5fd5e4a37a82a3f662df2dbb4a7fa Mon Sep 17 00:00:00 2001 From: Paolo Smiraglia Date: Wed, 12 Jun 2019 12:14:08 +0200 Subject: [PATCH 2/2] Update readme with Docker documentation --- README.rst | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/README.rst b/README.rst index b736d54..7aa8da8 100644 --- a/README.rst +++ b/README.rst @@ -23,6 +23,74 @@ If you want to save full log `like this one `_ jus $ knockpy domain.com --json +=============== +Use with Docker +=============== + +**Prerequisites** + +- Docker engine + +**Build the image** + +.. code-block:: + + $ docker build --tag guelfoweb/knockpy:4.1.1 . + +**Use the image: show man page** + +.. code-block:: + + $ docker run -ti --rm guelfoweb/knockpy:4.1.1 --help + usage: knockpy [-h] [-v] [-w WORDLIST] [-r] [-c] [-f] [-j] domain + + ___________________________________________ + + knock subdomain scan + knockpy v.4.1.1 + Author: Gianni 'guelfoweb' Amato + Github: https://github.com/guelfoweb/knock + ___________________________________________ + + positional arguments: + domain target to scan, like domain.com + + optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + -w WORDLIST specific path to wordlist file + -r, --resolve resolve single ip or domain name + -c, --csv save output in csv + -f, --csvfields add fields name to the first row of csv output file + -j, --json export full report in JSON + + example: + knockpy domain.com + knockpy domain.com -w wordlist.txt + knockpy -r domain.com or IP + knockpy -c domain.com + knockpy -j domain.com + + For virustotal subdomains support you can setting your API KEY in the + config.json file. + +**Use the image: run with defaults** + +.. code-block:: + + $ docker run -ti --rm guelfoweb/knockpy:4.1.1 domain.com + +**Use the image: run with customisations** + +.. code-block:: + + $ docker run -ti --rm \ + -v "myconfig.json:/src/app/knockpy/config.json:ro" \ + -v "mywordlist.txt:/tmp/mywordlist.txt:ro" \ + guelfoweb/knockpy:4.1.1 \ + -w /tmp/mywordlist.txt \ + domain.com + ======= Install =======