Skip to content

Commit 7fd454c

Browse files
committed
allow searching CT subdomains
1 parent e8351be commit 7fd454c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

certgraph.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var savePath string
4545
var details bool
4646
var printJSON bool
4747
var ct bool
48+
var include_ct_sub bool
4849
var tls_connect bool
4950
var ver bool
5051

@@ -312,8 +313,9 @@ func main() {
312313
timeoutPtr := flag.Uint("timeout", 5, "tcp timeout in seconds")
313314
flag.BoolVar(&verbose, "verbose", false, "verbose logging")
314315
flag.BoolVar(&ct, "ct", false, "use certificate transparancy search to find certificates")
316+
flag.BoolVar(&include_ct_sub, "ct-subdomains", false, "include sub-domains in certificate transparancy search")
315317
flag.BoolVar(&notls, "notls", false, "don't connect to hosts to collect certificates")
316-
flag.UintVar(&maxDepth, "depth", 20, "maximum BFS depth to go")
318+
flag.UintVar(&maxDepth, "depth", 5, "maximum BFS depth to go")
317319
flag.UintVar(&parallel, "parallel", 10, "number of certificates to retrieve in parallel")
318320
flag.BoolVar(&starttls, "starttls", false, "connect without TLS and then upgrade with STARTTLS for SMTP, useful with -port 25")
319321
flag.BoolVar(&details, "details", false, "print details about the domains crawled")
@@ -520,7 +522,7 @@ func BFSVisit(node *DomainNode) {
520522
func visitCT(node *DomainNode) {
521523
// perform ct search
522524
// TODO do pagnation in multiple threads to not block on long searches
523-
search_result, err := QueryDomain(node.Domain, false, false)
525+
search_result, err := QueryDomain(node.Domain, false, include_ct_sub)
524526
if err != nil {
525527
v(err)
526528
return

0 commit comments

Comments
 (0)