Skip to content

Commit

Permalink
Update crt_v2.go
Browse files Browse the repository at this point in the history
adding a menu
  • Loading branch information
an4kein authored Jun 7, 2021
1 parent aa3af8f commit 551d62b
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions crt_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,22 @@ import (
"fmt"
"io/ioutil"
"net/http"
"os"
)

var banner = `
_
___ _ __| |_ __ _ ___
/ __| '__| __| / _ |/ _ \
| (__| | | |_ | (_| | (_) |
\___ |_| \__(_)__, |\___/
|___/
[+] by @anakein
[+] https://github.com/an4kein
[-] Usage: crt.go <target>
`

type Crtsr struct {
CommonName string `json:"common_name"`
}
Expand All @@ -33,10 +47,20 @@ func GetJsonFromCrt(domain string) {
fmt.Println("error:", err)
}
for _, subdomain := range subdomains {
fmt.Println("Found:", subdomain.CommonName)
fmt.Println(subdomain.CommonName)
}
fmt.Println("FOUND", len(subdomains), "SUBDOMAINS")

}

func main() {
GetJsonFromCrt("facebook.com")
fmt.Println(banner)
if os.Args != nil && len(os.Args) > 1 {
domain := os.Args[1]
if domain != "" {
fmt.Println("+---------------------=[Gathering Certificate Subdomains]=------------------------+")
GetJsonFromCrt(domain)
fmt.Println("+--------------------------------=[Done!]=----------------------------------------+")
}
}
}

0 comments on commit 551d62b

Please sign in to comment.