diff --git a/github-recon/email/commits.go b/github-recon/email/commits.go index 5f076e9..5df607e 100644 --- a/github-recon/email/commits.go +++ b/github-recon/email/commits.go @@ -2,6 +2,7 @@ package recon import ( "fmt" + "strings" github_recon_settings "github.com/anotherhadi/github-recon/settings" "github.com/anotherhadi/github-recon/utils" @@ -49,7 +50,7 @@ func Commits(s github_recon_settings.Settings) (response CommitsResult) { if utils.SkipResult(name, email) { continue } - if _, seen := results[name+" - "+email+" - "+login]; !seen { + if _, seen := results[strings.ToLower(name)+" - "+strings.ToLower(email)+" - "+strings.ToLower(login)]; !seen { author := CommitResult{ Name: name, Email: email, @@ -58,11 +59,11 @@ func Commits(s github_recon_settings.Settings) (response CommitsResult) { FirstFoundIn: item.GetRepository().Owner.GetLogin() + "/" + item.GetRepository(). GetName(), } - results[name+" - "+email+" - "+login] = author + results[strings.ToLower(name)+" - "+strings.ToLower(email)+" - "+strings.ToLower(login)] = author } else { - result := results[name+" - "+email+" - "+login] + result := results[strings.ToLower(name)+" - "+strings.ToLower(email)+" - "+strings.ToLower(login)] result.Occurrences++ - results[name+" - "+email+" - "+login] = result + results[strings.ToLower(name)+" - "+strings.ToLower(email)+" - "+strings.ToLower(login)] = result } } } diff --git a/github-recon/username/commits.go b/github-recon/username/commits.go index 7385b26..3d7d205 100644 --- a/github-recon/username/commits.go +++ b/github-recon/username/commits.go @@ -2,6 +2,7 @@ package recon import ( "fmt" + "strings" github_recon_settings "github.com/anotherhadi/github-recon/settings" "github.com/anotherhadi/github-recon/utils" @@ -54,25 +55,27 @@ func Commits(s github_recon_settings.Settings) (response CommitsResult) { } for i := range names { - if utils.SkipResult(names[i], emails[i]) { + name := names[i] + email := emails[i] + if utils.SkipResult(name, email) { continue } - if names[i] == "" || emails[i] == "" { + if name == "" || email == "" { continue } - if _, seen := results[names[i]+" - "+emails[i]]; !seen { + if _, seen := results[strings.ToLower(name)+" - "+strings.ToLower(email)]; !seen { author := CommitResult{ - Name: names[i], - Email: emails[i], + Name: name, + Email: email, Occurrences: 1, FirstFoundIn: item.GetRepository().Owner.GetLogin() + "/" + item.GetRepository(). GetName(), } - results[names[i]+" - "+emails[i]] = author + results[strings.ToLower(name)+" - "+strings.ToLower(email)] = author } else if i == 0 { - result := results[names[i]+" - "+emails[i]] + result := results[strings.ToLower(name)+" - "+strings.ToLower(email)] result.Occurrences++ - results[names[i]+" - "+emails[i]] = result + results[strings.ToLower(name)+" - "+strings.ToLower(email)] = result } } }