Last active
November 27, 2023 21:08
-
-
Save hakluke/d4ba893149a65c737357b377de92c94e to your computer and use it in GitHub Desktop.
Generate all 3 character domains of all TLDs in ./tlds.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
func main() { | |
chars := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m", "-"} | |
file, _ := os.Open("./tlds.txt") | |
defer file.Close() | |
scanner := bufio.NewScanner(file) | |
for scanner.Scan() { | |
for _, one := range chars { | |
for _, two := range chars { | |
for _, three := range chars { | |
if one != "-" && three != "-" { | |
fmt.Printf("%s%s%s.%s\n", one, two, three, scanner.Text()) | |
} | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment