Skip to content
Kirill Zhdanov edited this page Jan 20, 2024 · 3 revisions

Warning: large amount of data in stdout

  1. Increment digits one by one with -i option will generate 127 lines:
echo aws1.s22.env3.tesla.com | ./src/pnk/__main__.py  -i | wc -l
     127     141    3584
@timeit: run took 0.0006132125854492188 seconds
  • Justification: 2 x 10 + 1 x 100 + 3! = 126
  • Note: wc show us 127, so +1 is for duplicated line for subdomain permutation case! 1 x 100 is for two-sign number 22 (00..99).
  1. In case of Cartesian product with -c flag pnk will produce 10007 combinations just for 1 line of stdin:
echo aws1.s22.env3.tesla.com | ./src/pnk/__main__.py  -c | wc -l    
   10007
@timeit: run took 0.01621699333190918 seconds
  • Justification: 10 x 10 x 100 + 3! = 10006 with the same notes as above.
  1. It is recommended to run the script using -i first. Use the -c flag carefully and try to estimate the stdout because massive amount of subdomains are expected.
Clone this wiki locally