-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathazuredb.go
More file actions
38 lines (36 loc) · 960 Bytes
/
azuredb.go
File metadata and controls
38 lines (36 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"fmt"
"bufio"
"os"
"net"
"sync"
)
func azureDb() {
fmt.Println("[\033[36;1m*\033[0m] \033[36;1mAzure Databases: \033[0m")
fmt.Println("====================================================")
azdjobs := make(chan string)
var wg sync.WaitGroup
for i := 0; i < concurrency; i ++ {
wg.Add(1)
go func() {
defer wg.Done()
for domain := range azdjobs {
url := domain + ".database.windows.net"
_, err := net.LookupHost(url)
if err != nil {
continue
}
fmt.Println(url + " [\033[32mREGISTERED DNS\033[0m] \033[0m")
}
}()
}
sc := bufio.NewScanner(os.Stdin)
for sc.Scan() {
domain := sc.Text()
azdjobs <- domain
}
close(azdjobs)
wg.Wait()
fmt.Println("====================================================")
}