feat: Add automatic TLD updater (#10)
This commit is contained in:
21
tools/make_tld_list.py
vendored
Normal file
21
tools/make_tld_list.py
vendored
Normal 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()
|
||||
Reference in New Issue
Block a user