Skip to content

Instantly share code, notes, and snippets.

View wdahlenburg's full-sized avatar

Wyatt Dahlenburg wdahlenburg

View GitHub Profile
@wdahlenburg
wdahlenburg / aws_service_enum.sh
Created September 8, 2022 16:41
Small script to enumerate the services accessible to all of the roles in an AWS account. This helps set a baseline for services to investigate.
#!/bin/bash
services=()
for role in $(aws iam list-roles | jq '.Roles[].RoleName' -r);
do
echo 'role is '$role
for policy_arn in $(aws iam list-attached-role-policies --role-name $role | jq '.AttachedPolicies[].PolicyArn' -r);
do
if [[ ! -z $policy_arn ]];
then
@wdahlenburg
wdahlenburg / similar_filter.py
Last active December 6, 2020 03:24
Uniquely Filter Urls
#!/bin/python3
from difflib import SequenceMatcher
import sys
def similar(a, b):
return SequenceMatcher(None, a, b).ratio()
def main():
uniqueUrls = []
for line in sys.stdin: