Skip to content

Full Toolkit for Next-Level Domain Analysis

Include wildcard certificates on certs page 🌟

Felix Wotschofsky789a4a2b341f
diff --git a/app/lookup/[domain]/certs/page.tsx b/app/lookup/[domain]/certs/page.tsx
index a3b9dc8..10d2421 100644
--- a/app/lookup/[domain]/certs/page.tsx
+++ b/app/lookup/[domain]/certs/page.tsx
@@ -52,7 +52,23 @@ export const preferredRegion = 'lhr1';
const CertsResultsPage: FC<CertsResultsPageProps> = async ({
params: { domain },
}) => {
- const certs = await lookupCerts(domain);
+ const certRequests = [lookupCerts(domain)];
+
+ const hasParentDomain = domain.split('.').filter(Boolean).length > 2;
+ if (hasParentDomain) {
+ const parentDomain = domain.split('.').slice(1).join('.');
+ certRequests.push(lookupCerts(`*.${parentDomain}`));
+ }
+
+ const certs = await Promise.all(certRequests).then((responses) =>
+ responses
+ .flat()
+ .sort(
+ (a, b) =>
+ new Date(b.entry_timestamp).getTime() -
+ new Date(a.entry_timestamp).getTime()
+ )
+ );
if (!certs.length) {
return (