Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import os
import sys
BRO_CERT_TEMPLATE = """#auto generated
redef SSL::root_certs += {
["%(subject)s"] = "%(cert)s"
};
"""
@gene1wood
gene1wood / GET-STS-SESSION.md
Last active October 15, 2023 22:45
Tool to create ephemeral awscli/boto config/credentials files for creating a long lasting (36 hour) cached MFA and child assumed role

Setup

SOURCE_PROFILE_NAME

If the AWS API key and secret which you use and and are stored in ~/.aws/credentials in a profile called default then you don't need to set the SOURCE_PROFILE_NAME in the code. If the profile name in ~/.aws/credentials is something other than default then set SOURCE_PROFILE_NAME to that name. For example if your ~/.aws/credentials looked like this

@BretFisher
BretFisher / docker-for-windows.md
Last active June 5, 2024 10:16
Getting a Shell in the Docker for Windows Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your CLI and it'll drop you in a container with full permissions on the Moby VM. Only works for Moby Linux VM (doesn't work for Windows Containers). Note this also works on Docker for Mac.

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1