Skip to content

Instantly share code, notes, and snippets.

James Hale jmhale

Block or report user

Report or block jmhale

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jmhale /
Created May 3, 2019
Gets listening ports inside of a Docker container
CONTAINER_PID=$(sudo docker inspect -f '{{.State.Pid}}' container_name; sudo nsenter -t $CONTAINER_PID -n netstat -ln | grep LISTEN
jmhale /
Created Apr 25, 2019
Installs cloudflared and configures it to use Quad9's DNS-over-HTTPS (DoH)
tar -xvzf cloudflared-stable-linux-arm.tgz
sudo cp ./cloudflared /usr/local/bin
sudo chmod +x /usr/local/bin/cloudflared
useradd -s /usr/sbin/nologin -r -M cloudflared
cat <<EOF > /etc/default/cloudflared
# Commandline args for cloudflared

Keybase proof

I hereby claim:

  • I am jmhale on github.
  • I am jhale ( on keybase.
  • I have a public key ASDHkIOQMIqIh7OYC9V4HqwpPaF2RZylhtjLlxoBfro4TAo

To claim this, I am signing this object:

View gist:5a27833565e5185a4838b2227765b690
aws ec2 describe-instances | jq -r '[.Reservations[].Instances[].ImageId] | unique[]'
## Temporary VPN for DEF CON
variable "dns_zone" {}
variable "dns_zone_id" {}
variable "ssh_key_id" {}
data "aws_iam_policy_document" "access-defcon-artifacts-policy-doc" {
statement {
actions = [
## Temporary VPC for DEF CON
variable "defcon_cidr_vpc" { default = "" }
variable "defcon_cidr_private_east_1a" { default = ""}
variable "defcon_cidr_private_east_1b" { default = ""}
variable "defcon_cidr_private_east_1c" { default = ""}
variable "defcon_cidr_public_east_1a" { default = ""}
variable "defcon_cidr_public_east_1b" { default = ""}
variable "defcon_cidr_public_east_1c" { default = ""}
jmhale /
Last active Dec 6, 2017
Links to the AWS re:Invent 2017 Security (SID) sessions. Blatantly stolen from:, where you can find the full list of talks.
jmhale /
Created Nov 16, 2017
Handles MFA auth to Okta and outputs session_token
""" Handles auth to Okta and return session_token """
#pylint: disable=C0325
import os
from ConfigParser import RawConfigParser
from getpass import getpass
import requests
class OktaAuth(object):
""" Handles auth to Okta and returns SAML assertion """
def __init__(self, okta_profile, verbose):
You can’t perform that action at this time.