File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,3 +527,40 @@ azscan -domain umgc
527527 CNAME data-prod-ncu.vaultcore.azure.net.
528528```
529529
530+ ## GitHub Email Addresses
531+
532+ A script for enumerating GitHub to find a user's email:
533+
534+ ``` sh
535+ #! /usr/bin/env bash
536+
537+ # A script for enumerating GitHub to find a user's email
538+
539+ USERNAME=" $1 "
540+ if [ -z " $USERNAME " ]; then
541+ echo " Usage: $0 <github_username>"
542+ exit 1
543+ fi
544+
545+ echo " Searching emails for GitHub user: $USERNAME "
546+
547+ echo -e " \nChecking public profile..."
548+ PROFILE_EMAIL=$( curl -s " https://api.github.com/users/$USERNAME " | jq -r ' .email' )
549+ if [ " $PROFILE_EMAIL " != " null" ] && [ -n " $PROFILE_EMAIL " ]; then
550+ echo " Public profile email: $PROFILE_EMAIL "
551+ else
552+ echo " No public email found on profile."
553+ fi
554+
555+ echo -e " \nChecking recent commit activity..."
556+ EMAILS=$( curl -s " https://api.github.com/users/$USERNAME /events/public" |
557+ jq -r ' .[].payload.commits[]? | select(.author.email | contains("noreply") | not) | .author.email' |
558+ sort -u)
559+
560+ if [ -n " $EMAILS " ]; then
561+ echo " Emails found in recent commits:"
562+ echo " $EMAILS "
563+ else
564+ echo " No commit emails found."
565+ fi
566+ ```
You can’t perform that action at this time.
0 commit comments