Skip to content

Instantly share code, notes, and snippets.

View tiagocordeiro's full-sized avatar
:octocat:
Focusing

Tiago Cordeiro ⚡ tiagocordeiro

:octocat:
Focusing
View GitHub Profile

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@tiagocordeiro
tiagocordeiro / S3NakedInPublic.py
Created June 29, 2019 03:45 — forked from ScriptAutomate/S3NakedInPublic.py
[Python 3 / boto3 / AWS] List all S3 buckets, in the default region config, that have 'Public' permissions listed anywhere in the ACL
import boto3
s3 = boto3.resource('s3')
for bucket in s3.buckets.all():
for oh_noes in s3.BucketAcl(bucket.name).grants:
if oh_noes['Grantee']['Type'] == 'Group' and oh_noes['Grantee']['URI'] == 'http://acs.amazonaws.com/groups/global/AllUsers':
print(bucket)
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/riverfount/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes