feat: Add automatic TLD updater (#10)

This commit is contained in:
Krypton
2023-10-06 08:49:00 +02:00
committed by GitHub
parent 7699fbd339
commit a807b887da
3 changed files with 57 additions and 0 deletions

21
tools/make_tld_list.py vendored Normal file
View File

@@ -0,0 +1,21 @@
import requests
def get_content(url: str) -> str:
response = requests.get(
url=url,
headers={
"User-Agent": "Krypton's Wordlists (https://github.com/kkrypt0nn/wordlists)"
},
)
return response.text
def main() -> None:
content = get_content("https://data.iana.org/TLD/tlds-alpha-by-domain.txt")
with open("./wordlists/discovery/tlds.txt", "w+", encoding="utf-8") as manuf_file:
manuf_file.write(content)
if __name__ == "__main__":
main()