Skip to content

Commit b545ec1

Browse files
committed
docs: cartesian product option notes, demo; remove todo because its done
1 parent b9e2d04 commit b545ec1

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

README.md

+21-16
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Produce a new combination of subdomains - generates permutations P(n,k).
1010
2. `stdout`: supports standard output.
1111
3. Works with the next arguments:
1212
```
13-
usage: pnk.py [-h] [-i | -c] [-v] [FILE ...]
13+
usage: pnk [-h] [-i | -c] [-v] [FILE ...]
1414
1515
Generates a new subdomains on provided input
1616
@@ -20,15 +20,15 @@ positional arguments:
2020
optional arguments:
2121
-h, --help show this help message and exit
2222
-i, --increment increment any one or two digits on subdomains
23-
-c, --cartesian increment digits on subdomains creating Cartesian product
23+
-c, --cartesian increment digits on subdomains creating their Cartesian product
2424
-v, --version show program's version number and exit
2525
```
2626
```bash
2727
$ cat subs1.txt subs2.txt | pnk
2828
```
2929

3030
## Make it fast
31-
WIP: but for now, to turn this single process script into multiprocess use [interlace](https://github.com/codingo/Interlace)
31+
To turn this single process script into multiprocess use [interlace](https://github.com/codingo/Interlace)
3232

3333

3434
# Features
@@ -52,6 +52,19 @@ aws2-3.s11.env2.tesla.com
5252
aws8-8.s11.env2.tesla.com
5353
aws9-9.s11.env2.tesla.com
5454
...
55+
```
56+
Using the cartesian product option:
57+
```bash
58+
echo "v0.1-v2.tcsbank.ru" | pnk -c
59+
v0.dev0-v0.tcsbank.ru
60+
v1.dev0-v0.tcsbank.ru
61+
...
62+
v0.dev1-v0.tcsbank.ru
63+
v0.dev2-v0.tcsbank.ru
64+
...
65+
v9.dev9-v8.tcsbank.ru
66+
v9.dev9-v9.tcsbank.ru
67+
5568
```
5669

5770
## Install & Usage
@@ -65,10 +78,6 @@ $ cat subs1.txt subs2.txt | ./src/pnk/__main__.py
6578
```
6679

6780
# Constraints
68-
### Feature request
69-
See the open [issue](https://github.com/storenth/pnk/issues/1#issue-2080221058) for the following feature requests:
70-
- [ ] replace each subs with word in wordlist: v2.test.domain.com -> demo.test.domain.com
71-
- [ ] prepend/append word by creating new subs: test.domain.com -> demo.test.domain.com, test.demo.domain.com
7281
### Limitations
7382
1. Does't handle incremet option in the following cases: more then two digits:
7483
```
@@ -80,12 +89,8 @@ aws.1002030v.amazon.com -> aws.1002030v.amazon.com
8089
$ pnk < list.txt | massdns -
8190
```
8291
3. Possible out of memory issues when redirecting `stdout` to a file, please read the [Wiki](https://github.com/storenth/pnk/wiki)
83-
## TODO
84-
1. Combinations of incrementations (cartesian product of all digits found in each sub):
85-
```
86-
5io5.33.ya.ru -> 0io0.00.ya.ru .. 9io9.99.ya.ru
87-
```
88-
How it works now:
89-
```
90-
5io5.33.ya.ru -> 0io5.00.ya.ru .. 9io5.99.ya.ru .. 5io0.00.ya.ru .. 5io9.99.ya.ru
91-
```
92+
93+
### Feature request
94+
See the open [issue](https://github.com/storenth/pnk/issues/1#issue-2080221058) for the following feature requests:
95+
- [ ] replace each subs with word in wordlist: v2.test.domain.com -> demo.test.domain.com
96+
- [ ] prepend/append word by creating new subs: test.domain.com -> demo.test.domain.com, test.demo.domain.com

0 commit comments

Comments
 (0)