| Title | Description
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
""" 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): |
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
## Temporary VPC for DEF CON | |
variable "defcon_cidr_vpc" { default = "10.170.0.0/16" } | |
variable "defcon_cidr_private_east_1a" { default = "10.170.1.0/24"} | |
variable "defcon_cidr_private_east_1b" { default = "10.170.2.0/24"} | |
variable "defcon_cidr_private_east_1c" { default = "10.170.3.0/24"} | |
variable "defcon_cidr_public_east_1a" { default = "10.170.11.0/24"} | |
variable "defcon_cidr_public_east_1b" { default = "10.170.12.0/24"} | |
variable "defcon_cidr_public_east_1c" { default = "10.170.13.0/24"} |
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
## 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 = [ | |
"s3:GetObject", |
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
aws ec2 describe-instances | jq -r '[.Reservations[].Instances[].ImageId] | unique[]' |
I hereby claim:
- I am jmhale on github.
- I am jhale (https://keybase.io/jhale) on keybase.
- I have a public key ASDHkIOQMIqIh7OYC9V4HqwpPaF2RZylhtjLlxoBfro4TAo
To claim this, I am signing this object:
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
wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz | |
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 | |
cat <<EOF > /etc/default/cloudflared | |
# Commandline args for cloudflared |
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
CONTAINER_PID=$(sudo docker inspect -f '{{.State.Pid}}' container_name; sudo nsenter -t $CONTAINER_PID -n netstat -ln | grep LISTEN |
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
find . -type d -name '.git' | while read dir ; do sh -c "cd $dir/../ && git status -s | grep -q [azAZ09] && echo ---- ${dir//\.git/} ---- && git status -s" ; done |
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
aws ec2 describe-instances --query "Reservations[*].Instances[*].{IPAddress:PrivateIpAddress,Name:Tags[?Key=='Name']|[0].Value,Status:State.Name}" --filters Name=instance-state-name,Values=running --output table |
OlderNewer