mirror of
https://github.com/anotherhadi/github-recon.git
synced 2026-10-05 10:58:25 +02:00
add avatar when found a user via email spoofing
Signed-off-by: Hadi <[email protected]>
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user