-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdomain.go
38 lines (34 loc) · 927 Bytes
/
domain.go
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"
"github.com/jheise/gothreat"
)
func process_domain(target string) {
fmt.Printf("Looking up Domain: %s\n", target)
domain_data, err := gothreat.DomainReport(target)
//body, err = gothreat.DomainReport(*target)
if err != nil {
panic(err)
}
fmt.Printf("Permalink: %s\n", domain_data.Permalink)
fmt.Printf("References:\n")
for _, reference := range domain_data.References {
fmt.Printf("\t%s\n", reference)
}
fmt.Printf("Hashes:\n")
for _, hash := range domain_data.Hashes {
fmt.Printf("\t%s\n", hash)
}
fmt.Printf("Emails:\n")
for _, email := range domain_data.Emails {
fmt.Printf("\t%s\n", email)
}
fmt.Printf("Subdomains:\n")
for _, subdomain := range domain_data.Subdomains {
fmt.Printf("\t%s\n", subdomain)
}
fmt.Printf("Resolutions:\n")
for _, resolve := range domain_data.Resolutions {
fmt.Printf("\t%s -> %s\n", resolve.LastResolved, resolve.IPAddress)
}
}