From 7037ec08648aff1976a621b0f5303493194f5a5d Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sat, 23 Aug 2025 10:50:02 +0200 Subject: [PATCH] add the --spoof-email toggle Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- README.md | 1 + cmd/email.go | 8 +++++--- settings/settings.go | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 779e0e1..507e953 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ github-recon [--flags value] target_username_or_email -s, --show-source Show where the information (authors, emails, etc) were found (only for deep scan) -m, --max-distance int Maximum Levenshtein distance for matching usernames & emails (only for deep scan) (default 20) -S, --silent Suppress all non-essential output + --spoof-email Spoof email (only for email mode) (default true) -h, --hide-avatar Hide the avatar in the output -j, --json string Write results to specified JSON file ``` diff --git a/cmd/email.go b/cmd/email.go index e934230..25e012f 100644 --- a/cmd/email.go +++ b/cmd/email.go @@ -25,7 +25,9 @@ func email(settings github_recon_settings.Settings, datetime string) { result.Commits = recon.Commits(settings) printStruct(settings, result.Commits, 0) - printTitle(settings.Silent, "🎭 Spoofing test") - result.Spoofing = recon.Spoofing(settings) - printStruct(settings, result.Spoofing, 0) + if settings.SpoofEmail { + printTitle(settings.Silent, "🎭 Spoofing test") + result.Spoofing = recon.Spoofing(settings) + printStruct(settings, result.Spoofing, 0) + } } diff --git a/settings/settings.go b/settings/settings.go index 2d46d80..f5cc013 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -33,6 +33,7 @@ type Settings struct { DeepScan bool MaxDistance int HideAvatar bool + SpoofEmail bool // Internal Client *github.Client @@ -94,6 +95,7 @@ func GetSettings() (settings Settings) { ) flag.BoolVarP(&settings.Silent, "silent", "S", false, "Suppress all non-essential output") + flag.BoolVarP(&settings.SpoofEmail, "spoof-email", "", true, "Spoof email (only for email mode)") flag.BoolVarP(&settings.HideAvatar, "hide-avatar", "h", false, "Hide the avatar in the output") flag.StringVarP(&settings.JsonOutput, "json", "j", "", "Write results to specified JSON file")