add avatar when found a user via email spoofing

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2025-08-23 14:40:39 +02:00
parent df6c8bca11
commit 426d10b2fe
2 changed files with 10 additions and 6 deletions
+3
View File
@@ -31,6 +31,9 @@ func email(settings github_recon_settings.Settings, datetime string) {
} else { } else {
printTitle(settings.Silent, "🎭 Spoofing test") printTitle(settings.Silent, "🎭 Spoofing test")
result.Spoofing = recon.Spoofing(settings) result.Spoofing = recon.Spoofing(settings)
if result.Spoofing.AvatarURL != "" {
printAvatar(settings, result.Spoofing.AvatarURL)
}
printStruct(settings, result.Spoofing, 0) printStruct(settings, result.Spoofing, 0)
} }
} }
+3 -2
View File
@@ -13,6 +13,7 @@ type SpoofingResult struct {
Name string Name string
Email string Email string
Url string Url string
AvatarURL string
} }
func RandomString(n int) string { func RandomString(n int) string {
@@ -41,7 +42,6 @@ func Spoofing(s github_recon_settings.Settings) (response SpoofingResult) {
} }
utils.WaitForRateLimit(s, resp) utils.WaitForRateLimit(s, resp)
// branche par défaut (fallback "main")
branch := repo.GetDefaultBranch() branch := repo.GetDefaultBranch()
if branch == "" { if branch == "" {
branch = "main" branch = "main"
@@ -73,7 +73,7 @@ func Spoofing(s github_recon_settings.Settings) (response SpoofingResult) {
commit := &github.Commit{ commit := &github.Commit{
Author: author, Author: author,
Message: github.String("Spoofed empty commit"), 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}, Parents: []*github.Commit{parentCommit},
} }
@@ -108,6 +108,7 @@ func Spoofing(s github_recon_settings.Settings) (response SpoofingResult) {
response.Name = last.GetAuthor().GetName() response.Name = last.GetAuthor().GetName()
response.Email = last.GetAuthor().GetEmail() response.Email = last.GetAuthor().GetEmail()
response.Url = last.GetAuthor().GetHTMLURL() response.Url = last.GetAuthor().GetHTMLURL()
response.AvatarURL = last.GetAuthor().GetAvatarURL()
} }
// 4) Cleanup // 4) Cleanup