Skip to content

Instantly share code, notes, and snippets.

View jchrisfarris's full-sized avatar

Chris Farris jchrisfarris

View GitHub Profile
@ottokruse
ottokruse / aws-console
Last active March 14, 2024 10:36
Python script to launch the AWS console in your webbrowser, using a presigned URL generated from your AWS CLI credentials
#!/usr/bin/env python3
"""
Usage:
- Save this script somewhere on your path (e.g. `vi /usr/local/bin/aws-console && chmod +x /usr/local/bin/aws-console`)
- Make AWS credentials available in one of the usual places where boto3 can find them (~/.aws/credentials, env var, etc.)
- Excute the script: `aws-console --profile myprofile`
- :tada: Your browser opens and you are signed in into the AWS console
"""
@fransr
fransr / bucket-disclose.sh
Last active January 23, 2024 20:18
Using error messages to decloak an S3 bucket. Uses soap, unicode, post, multipart, streaming and index listing as ways of figure it out. You do need a valid aws-key (never the secret) to properly get the error messages
#!/bin/bash
# Written by Frans Rosén (twitter.com/fransrosen)
_debug="$2" #turn on debug
_timeout="20"
#you need a valid key, since the errors happens after it validates that the key exist. we do not need the secret key, only access key
_aws_key="AKIA..."
H_ACCEPT="accept-language: en-US,en;q=0.9,sv;q=0.8,zh-TW;q=0.7,zh;q=0.6,fi;q=0.5,it;q=0.4,de;q=0.3"
H_AGENT="user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"