infosec-au / altdns

Generates permutations, alterations and mutations of subdomains and then resolves them
Apache License 2.0
2.26k stars 446 forks source link

Improved performance of URL modification generation function #45

Open GuilhermeMonteiroPeixoto opened 1 year ago

GuilhermeMonteiroPeixoto commented 1 year ago

To improve the performance of this function, one way would be to change the inner loop that iterates over alteration_words to create the URLs to an outer loop. This way, instead of iterating over alteration_words on each iteration of the main loop, you could iterate over alteration_words just once and generate all the URLs at once. This should be faster than doing it on each iteration of the main loop.

Another suggestion would be to change the main loop to iterate over a list of tuples, where each tuple is formed by the current subdomain and the alteration_words to be added to it. This way, you could generate all the URLs with the modified subdomains at once, instead of having to read and write each line individually to the output file.