Skip to content

Commit

Permalink
docs: cartesian product option notes, demo; remove todo because its done
Browse files Browse the repository at this point in the history
  • Loading branch information
storenth committed Jan 24, 2024
1 parent b9e2d04 commit b545ec1
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Produce a new combination of subdomains - generates permutations P(n,k).
2. `stdout`: supports standard output.
3. Works with the next arguments:
```
usage: pnk.py [-h] [-i | -c] [-v] [FILE ...]
usage: pnk [-h] [-i | -c] [-v] [FILE ...]
Generates a new subdomains on provided input
Expand All @@ -20,15 +20,15 @@ positional arguments:
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 Cartesian product
-c, --cartesian increment digits on subdomains creating their Cartesian product
-v, --version show program's version number and exit
```
```bash
$ cat subs1.txt subs2.txt | pnk
```

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


# Features
Expand All @@ -52,6 +52,19 @@ aws2-3.s11.env2.tesla.com
aws8-8.s11.env2.tesla.com
aws9-9.s11.env2.tesla.com
...
```
Using the cartesian product option:
```bash
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

```

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

# Constraints
### Feature request
See the open [issue](https://github.com/storenth/pnk/issues/1#issue-2080221058) 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
1. Does't handle incremet option in the following cases: more then two digits:
```
Expand All @@ -80,12 +89,8 @@ aws.1002030v.amazon.com -> aws.1002030v.amazon.com
$ pnk < list.txt | massdns -
```
3. Possible out of memory issues when redirecting `stdout` to a file, please read the [Wiki](https://github.com/storenth/pnk/wiki)
## TODO
1. Combinations of incrementations (cartesian product of all digits found in each sub):
```
5io5.33.ya.ru -> 0io0.00.ya.ru .. 9io9.99.ya.ru
```
How it works now:
```
5io5.33.ya.ru -> 0io5.00.ya.ru .. 9io5.99.ya.ru .. 5io0.00.ya.ru .. 5io9.99.ya.ru
```

### Feature request
See the open [issue](https://github.com/storenth/pnk/issues/1#issue-2080221058) 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

0 comments on commit b545ec1

Please sign in to comment.