Knock v.4.1.1 - Subdomain Scan

Knockpy is a python tool designed to enumerate subdomains on a target domain through a wordlist. It is designed to scan for DNS zone transfer and to try to bypass the wildcard DNS record automatically if it is enabled. Now knockpy supports queries to VirusTotal subdomains, you can setting the API_KEY within the config.json file.

Very simply
$ knockpy domain.com
Export full report in JSON
If you want to save full log like this one just type:
$ knockpy domain.com --json

  • Python 2.7.6
  • Dnspython
$ sudo apt-get install python-dnspython
$ git clone https://github.com/guelfoweb/knock.git

$ cd knock

$ nano knockpy/config.json <- set your virustotal API_KEY

$ sudo python setup.py install
Note that it's recommended to use Google DNS: and

Knockpy arguments
$ knockpy -h
usage: knockpy [-h] [-v] [-w WORDLIST] [-r] [-c] [-j] domain


knock subdomain scan
knockpy v.4.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 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

  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.

Subdomain scan with internal wordlist
$ knockpy domain.com
Subdomain scan with external wordlist
$ knockpy domain.com -w wordlist.txt
Resolve domain name and get response headers
$ knockpy -r domain.com [or IP]
+ checking for virustotal subdomains: YES

        .......too long.......

+ checking for wildcard: NO
+ checking for zonetransfer: NO
+ resolving target: YES
        "zonetransfer": {
            "enabled": false,
            "list": []
        "target": "google.com",
        "hostname": "google.com",
        "virustotal": [

            .......too long.......

        "alias": [],
        "wildcard": {
            "detected": {},
            "test_target": "eqskochdzapjbt.google.com",
            "enabled": false,
            "http_response": {}
        "ipaddress": [
        "response_time": "0.0351989269257",
        "http_response": {
            "status": {
                "reason": "Found",
                "code": 302
            "http_headers": {
                "content-length": "256",
                "location": "http://www.google.it/?gfe_rd=cr&ei=60WIWdmnDILCXoKbgfgK",
                "cache-control": "private",
                "date": "Mon, 07 Aug 2017 10:50:19 GMT",
                "referrer-policy": "no-referrer",
                "content-type": "text/html; charset=UTF-8"
Save scan output in CSV
$ knockpy -c domain.com
Export full report in JSON
$ knockpy -j domain.com

Talk about
Ethical Hacking and Penetration Testing Guide Book by Rafay Baloch.
Knockpy comes pre-installed on the following security distributions for penetration test:

This tool is currently maintained by Gianni 'guelfoweb' Amato, who can be contacted at [email protected] or twitter @guelfoweb. Suggestions and criticism are welcome.

Knock v.4.1.1 - Subdomain Scan Knock v.4.1.1 - Subdomain Scan Reviewed by Zion3R on 5:55 PM Rating: 5