View r53_scan.py
#!/usr/bin/env python
from __future__ import print_function
import json
import boto3
domains_client=boto3.client('route53domains')
resource_client=boto3.client('route53')
paginator = resource_client.get_paginator('list_hosted_zones')
View aws_healthchecks.sh
#!/bin/bash
aws route53 list-health-checks | jq -r '["ID","FQDN"], ["--","---"], (.[][] | [.Id, .HealthCheckConfig.FullyQualifiedDomainName]) | @tsv'
View replace_ec2_sg_ip.py
#!/usr/bin/env python
from __future__ import print_function
import json
import boto3
ip="1.1.1.1/32"
new_ip="2.2.2.2/32"'
for region in ["us-east-1","us-west-1", "us-west-2"]:
View cat_ec2_security_groups.py
#!/usr/bin/env python
from __future__ import print_function
import json
import boto3
for region in ["us-east-1","us-west-1", "us-west-2"]:
ec2=boto3.client('ec2', region )
sgs = ec2.describe_security_groups()["SecurityGroups"]
for sg in sgs:
View new_rel_file.escript
#!/usr/bin/env escript
%% -*- erlang -*-
%% Author: Drew Gulino
-module(new_rel_file).
-export([main/1]).
write_terms(Filename, List) ->
Format = fun(Term) -> io_lib:format("~tp.~n", [Term]) end,
Text = lists:map(Format, List),
View BAD: syslog with raft_protocol=3
Aug 8 16:46:21 consul-qa-aws05 systemd[1]: Starting Consul service discovery agent...
Aug 8 16:46:21 consul-qa-aws05 systemd[1]: Started Consul service discovery agent.
Aug 8 16:46:21 consul-qa-aws05 consul[6268]: ==> WARNING: LAN keyring exists but -encrypt given, using keyring
Aug 8 16:46:21 consul-qa-aws05 consul[6268]: ==> WARNING: WAN keyring exists but -encrypt given, using keyring
Aug 8 16:46:21 consul-qa-aws05 consul[6268]: ==> WARNING: Expect Mode enabled, expecting 5 servers
Aug 8 16:46:21 consul-qa-aws05 consul[6268]: ==> Starting Consul agent...
Aug 8 16:46:21 consul-qa-aws05 consul[6268]: raft: Restored from snapshot 4-295004-1502204270457
Aug 8 16:46:21 consul-qa-aws05 consul[6268]: raft: Initial configuration (index=298061): [{Suffrage:Voter ID:01b365e4-dc5f-a730-0744-2315187d31c7 Address:34.228.202.214:8300} {Suffrage:Voter ID:ac31e8ef-a1b9-3ecd-ee1f-b4e2326ac5ee Address:52.1.85.126:8300} {Suffrage:Voter ID:6d2a07da-d73e-f007-7e8f-f22d8e93b0c0 Address:34.207.18.6:8300} {Suffrage:Nonvot
View parse_tcpdump_udp_53.py
#!/usr/bin/env python
from __future__ import print_function
import sys
import pyshark
from collections import defaultdict
filename = sys.argv[1]
do_dump_report=False
do_avg_report=True
View dnsmasq_cache_report.py
#!//usr/bin/env python
from __future__ import print_function
import sys
from collections import defaultdict
filename = sys.argv[1]
queries = defaultdict(lambda: defaultdict(float))
totals= defaultdict(float)
with open(filename) as f:
for line in f.readlines():
View gen_certs.sh
#!/bin/bash
# USAGE: > gen_certs.sh <root cert name> <server cert name> <client cert name>
if [ "$#" -ne 3 ]; then
echo "Illegal arguments, USAGE: > gen_certs.sh <root cert name> <server cert name> <client cert name>"
exit 1
fi
mkdir testca
cd testca
mkdir certs private
View pagerduty_get_incidents.py
#!/usr/bin/env python
from __future__ import print_function
import json
import re
from easyprocess import EasyProcess
import pandas as pd
more = True
page_size = 25
offset = 0