Skip to content

Commit 7f07786

Browse files
authored
feat: add github email enumeration script
1 parent 92178d4 commit 7f07786

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Threat_Intel.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
```

0 commit comments

Comments
 (0)