Created
February 17, 2015 23:38
-
-
Save achillean/c1cd5c37acde6bce4fc1 to your computer and use it in GitHub Desktop.
Get a list of duplicate SSL serial numbers.
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
#!/usr/bin/env python | |
import shodan | |
API_KEY = 'YOUR API KEY' | |
api = shodan.Shodan(API_KEY) | |
results = api.count('port:443,8443', facets=[('ssl.cert.serial', 100)]) | |
for facet in results['facets']['ssl.cert.serial']: | |
print 'Serial %s occurs %s times' % (facet['value'], facet['count']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment