Skip to content

Commit

Permalink
Merge pull request #202 from projectdiscovery/fix-certspotter
Browse files Browse the repository at this point in the history
Fixed a bound check issue with certspotter
  • Loading branch information
Ice3man543 authored Dec 14, 2019
2 parents ade6065 + e315870 commit ab7fc96
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/subscraping/sources/certspotter/certspotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
}
}

// if the number of responses is zero, close the channel and return.
if len(response) == 0 {
close(results)
return
}

id := response[len(response)-1].ID
for {
reqURL := fmt.Sprintf("https://api.certspotter.com/v1/issuances?domain=%s&include_subdomains=true&expand=dns_names&after=%s", domain, id)
Expand Down

0 comments on commit ab7fc96

Please sign in to comment.