Skip to content

Instantly share code, notes, and snippets.

@victortrac
victortrac / ssl_scanner.py
Last active August 29, 2015 13:58
Scans a host, route53 zones, and/or bind zone files for A and CNAME records and inventories SSL certificates
#!/usr/bin/env python
import argparse
import base64
import datetime
import hashlib
import json
import socket
import ssl
import sys
@victortrac
victortrac / gist:8446314
Created January 15, 2014 22:49
If you have a bunch of cloudformation templates referencing a canonical SSL certificate by name and you need to update the SSL certificate, this will do it with zero downtime.
import argparse
import boto
import boto.ec2.elb
import time
AWS_ACCOUNT_ID = '0123456789'
REGIONS = ['us-west-2', 'us-east-1', 'eu-west-1']
def get_matching_elbs(region, ssl_cert_arn):
print "getting matching elbs in region {}".format(region)