Last active
July 16, 2018 12:41
-
-
Save 0xbharath/cb7ade214d39c6977d8dd7a78d72ae0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT distinct issuer_ca_id, COUNT(*) FROM certificate_identity ci WHERE ci.NAME_TYPE = 'dNSName' AND reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower('%gov.in')) GROUP BY issuer_ca_id ORDER BY COUNT(*) desc; | |
SELECT certificate_id,issuer_o,issuer_cn FROM ccadb_certificate WHERE certificate_id IN(SELECT distinct certificate_id FROM certificate_identity ci WHERE ci.NAME_TYPE = 'dNSName' AND reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower('%appsecco.com'))); | |
SELECT distinct ca.name, COUNT(*) count FROM certificate_identity ci, ca ca WHERE ci.NAME_TYPE = 'dNSName' AND reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower('%gov.in')) AND ca.id=ci.issuer_ca_id GROUP BY ca.name ORDER BY count desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment