diff --git a/cmd/email.go b/cmd/email.go index a7996b6..56a11f6 100644 --- a/cmd/email.go +++ b/cmd/email.go @@ -31,6 +31,9 @@ func email(settings github_recon_settings.Settings, datetime string) { } else { printTitle(settings.Silent, "🎭 Spoofing test") result.Spoofing = recon.Spoofing(settings) + if result.Spoofing.AvatarURL != "" { + printAvatar(settings, result.Spoofing.AvatarURL) + } printStruct(settings, result.Spoofing, 0) } } diff --git a/github-recon/email/spoofing.go b/github-recon/email/spoofing.go index 58b9375..2d88fd6 100644 --- a/github-recon/email/spoofing.go +++ b/github-recon/email/spoofing.go @@ -9,10 +9,11 @@ import ( ) type SpoofingResult struct { - Username string - Name string - Email string - Url string + Username string + Name string + Email string + Url string + AvatarURL string } func RandomString(n int) string { @@ -41,7 +42,6 @@ func Spoofing(s github_recon_settings.Settings) (response SpoofingResult) { } utils.WaitForRateLimit(s, resp) - // branche par défaut (fallback "main") branch := repo.GetDefaultBranch() if branch == "" { branch = "main" @@ -73,7 +73,7 @@ func Spoofing(s github_recon_settings.Settings) (response SpoofingResult) { commit := &github.Commit{ Author: author, Message: github.String("Spoofed empty commit"), - Tree: &github.Tree{SHA: parentCommit.Tree.SHA}, // même tree => commit vide + Tree: &github.Tree{SHA: parentCommit.Tree.SHA}, Parents: []*github.Commit{parentCommit}, } @@ -108,6 +108,7 @@ func Spoofing(s github_recon_settings.Settings) (response SpoofingResult) { response.Name = last.GetAuthor().GetName() response.Email = last.GetAuthor().GetEmail() response.Url = last.GetAuthor().GetHTMLURL() + response.AvatarURL = last.GetAuthor().GetAvatarURL() } // 4) Cleanup