Generates permutations on provided subdomains
Project description
pnk
Produce a combination of subdomains - generates permutations P(n,k).
Make it work
- swap subs themselves: web.test.domain.com -> test.web.domain.com
- increase/decrease subs with numbers: test1.domain.com -> test2.domain.com
Make it right
stdin
: reads standard input. This is useful for capturing a pipeline’s contents at an intermediate stage of processing.stdout
: supports standard output.- Works with the next arguments:
usage: pnk.py [-h] [-i] [-w WORDLIST] [FILE ...]
Set CLI args pnk works with
positional arguments:
FILE list of subdomains/hosts to process
optional arguments:
-h, --help show this help message and exit
-i, --increment additionally increment digits on subdomains
$ cat subs1.txt subs2.txt | pnk
Make it fast
WIP: but for now, to turn this single process script into multiprocess use interlace
Features
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
...
Constraints
Feature request
See the open issue for the following feature requests:
- replace each subs with word in wordlist: v2.test.domain.com -> demo.test.domain.com
- prepend/append word by creating new subs: test.domain.com -> demo.test.domain.com, test.demo.domain.com
Limitations
Does't handle incremet option in the following cases: more then two digits:
v123.tesla.com -> v123.tesla.com
aws.777v.amazon.com -> aws.777v.amazon.com
TODO
- Combinations of incrementations (cartesian product):
5io5.33.ya.ru -> 0io0.00.ya.ru .. 9io9.99.ya.ru
- Package
PyPi-test ready
Usage
From the source code:
$ cat subs1.txt subs2.txt | ./src/pnk/__main__.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pnk-0.10.0.tar.gz
(5.7 kB
view hashes)
Built Distribution
pnk-0.10.0-py3-none-any.whl
(6.3 kB
view hashes)