Produce a new combination of subdomains - generates permutations P(n,k).
stdin
: reads standard input. This is useful for capturing a pipeline’s contents at an intermediate stage of processing.stdout
: supports standard output.
usage: pnk [-h] [-i | -c] [-d] [-r] [-t TARGET] [-w WORDLIST] [-v] [FILE ...]
Generates a new subdomains on provided input
positional arguments: FILE list of subdomains/hosts to process
optional arguments: -h, --help show this help message and exit -i, --increment increment any one or two digits on subdomains -c, --cartesian increment digits on subdomains creating their Cartesian product -d, --data generate test data from the stdin -r, --replace replace underscores and dashes with dots -t TARGET, --target TARGET target domain to find subs for (which will not be processed) -w WORDLIST, --wordlist WORDLIST mixed subdomains with wordlist -v, --version show program's version number and exit
```bash
$ cat subs1.txt subs2.txt | pnk
Permutations:
echo "aws3-3.s11.env2.tesla.com" | pnk
aws3-3.s11.env2.tesla.com
aws3-3.env2.s11.tesla.com
s11.aws3-3.env2.tesla.com
s11.env2.aws3-3.tesla.com
env2.aws3-3.s11.tesla.com
env2.s11.aws3-3.tesla.com
With incrementation option:
echo "aws3-3.s11.env2.tesla.com" | pnk -i
aws0-3.s11.env2.tesla.com
aws1-3.s11.env2.tesla.com
aws2-3.s11.env2.tesla.com
...
aws8-8.s11.env2.tesla.com
aws9-9.s11.env2.tesla.com
...
Using the cartesian product option:
echo "v0.1-v2.tcsbank.ru" | pnk -c
v0.dev0-v0.tcsbank.ru
v1.dev0-v0.tcsbank.ru
...
v0.dev1-v0.tcsbank.ru
v0.dev2-v0.tcsbank.ru
...
v9.dev9-v8.tcsbank.ru
v9.dev9-v9.tcsbank.ru
PyPi:
pip3 install --no-deps pnk
From the source code:
$ cat subs1.txt subs2.txt | ./src/pnk/__main__.py
v123.tesla.com -> v123.tesla.com
aws.1002030v.amazon.com -> aws.1002030v.amazon.com
$ pnk < list.txt | massdns -
stdout
to a file, please read the WikiSee the open issue for the following feature requests: