Merge pull request #202 from projectdiscovery/fix-certspotter

Fixed a bound check issue with certspotter
master v2.2.3
Ice3man 2019-12-14 11:26:37 -08:00 committed by GitHub
commit ab7fc967a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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)