commit d14dfccb64edd9fed83a169a54a63452652907b8 Author: PrincessPi3 Date: Sun May 24 04:34:40 2026 -0600 initial commit via gitinitshit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13e786b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*/secrets_* +*/parsed_* diff --git a/README.md b/README.md new file mode 100644 index 0000000..30c924e --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# fuck_git_downloader +downloads all of a github users public repos, scans them for secrets, then parses into something you can use. + +this is barely even a script and yet its so hysterically effective that id be remiss not to post it. here be dragons and all idk + +![i'm your biggest fan i'll folliow you until you love me, papa, paparazi](./rarity-webcore.jpeg) diff --git a/fuck_git_downloader.sh b/fuck_git_downloader.sh new file mode 100644 index 0000000..82b3442 --- /dev/null +++ b/fuck_git_downloader.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# packages required: git trufflehog gitsecrets pup + +# todo: make dis an arg +github_username='nationalsecurityagency' +github_base='https://github.com/' +github_repos_page="$github_base/$github_username/" + +# todo: make dis handle pagination +repos=$(curl -sS "${github_repos_page}?tab=repositories" | grep 'name codeRepository' | pup 'a attr{href}' | sed 's/\/PrincessPi3\///') + +out_dir="$PWD/$github_username" #todo: make dis an arg +mkdir -p "$out_dir" +secretsfile="$PWD/secrets_${github_username}.txt" + +nuke_repos_dir() { + if [ -d "$out_dir" ]; then + printf "deleting existing $out_dir... " + rm -rf "$out_dir" > /dev/null 2>&1 + printf "$?\n" + + printf "remaking $out_dir... " + mkdir -p "$out_dir" + printf "$?\n" + fi +} + +clone_repos() { + for repo in "${repos[@]}"; do + printf "cloning $repo into $out_dir/$repo..." + + git clone --recursive "$github_repos_page/$repo" "$out_dir/$repo" > /dev/null 2>&1 + + printf "$?\n" + done +} + +snoop_repos() { + for repo in "${repos[@]}"; do + cd "$out_dir/$repo" + pwd | tee -a "$secretsfile" + trufflehog git file://. | tee -a "$secretsfile" + gitleaks detect -v | tee -a "$secretsfile" + cd - + done +} + +# run em ig +nuke_repos_dir +clone_repos +snoop_repos \ No newline at end of file diff --git a/rarity-webcore.jpeg b/rarity-webcore.jpeg new file mode 100644 index 0000000..af2e4c8 Binary files /dev/null and b/rarity-webcore.jpeg differ