Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Jan 23, 2022
2 parents 20800f9 + e22f563 commit 83a0a97
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/Azure/go-ntlmssp v0.0.0-20211209120228-48547f28849e
github.com/fatih/color v1.13.0
github.com/nodauf/net-smtp v0.0.0-20220123142515-ae3aa26fb163
github.com/mozillazg/go-unidecode v0.1.1
github.com/spf13/cobra v1.2.1
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/nodauf/net-smtp v0.0.0-20220123142515-ae3aa26fb163 h1:ibyr4sPQNrPAK4fGuJxdIyX8tC8ytoTe/ryoQ5YpIRk=
github.com/nodauf/net-smtp v0.0.0-20220123142515-ae3aa26fb163/go.mod h1:bpKTQ3KO0V60W040bsyRGv/w7HxFYDQHGmBwgB4copE=
github.com/mozillazg/go-unidecode v0.1.1 h1:uiRy1s4TUqLbcROUrnCN/V85Jlli2AmDF6EeAXOeMHE=
github.com/mozillazg/go-unidecode v0.1.1/go.mod h1:fYMdhyjni9ZeEmS6OE/GJHDLsF8TQvIVDwYR/drR26Q=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
4 changes: 3 additions & 1 deletion src/modules/linkedin/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"net/url"
"strconv"
"strings"

"github.com/mozillazg/go-unidecode"
)

// getCompany return a struct that contains all the company of the research
Expand Down Expand Up @@ -80,7 +82,7 @@ func (options *Options) getPeople(companyID, start int) []string {
email = strings.ReplaceAll(email, "{f}", name[0][0:1])
email = strings.ReplaceAll(email, "{last}", name[1])
email = strings.ReplaceAll(email, "{l}", name[1][0:1])
email = strings.ToLower(email)
email = strings.ToLower(unidecode.Unidecode(email))
log.Success(email + " - " + people.PrimarySubtitle.Text + " - " + people.SecondarySubtitle.Text)
output = append(output, email)
}
Expand Down
4 changes: 3 additions & 1 deletion src/modules/searchEngine/gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"regexp"
"strconv"
"strings"

"github.com/mozillazg/go-unidecode"
)

// SEARCH_ENGINE contains url for search on Google and Bing
Expand Down Expand Up @@ -83,7 +85,7 @@ func (options *Options) Gather() []string {
email = strings.ReplaceAll(email, "{f}", result["FirstName"][0:1])
email = strings.ReplaceAll(email, "{last}", result["LastName"])
email = strings.ReplaceAll(email, "{l}", result["LastName"][0:1])
email = strings.ToLower(email)
email = strings.ToLower(unidecode.Unidecode(email))
log.Success(email)
output = append(output, email)
nbFoundEmail += 1
Expand Down
1 change: 1 addition & 0 deletions src/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func GetBodyInWebsite(url string, proxy func(*http.Request) (*url.URL, error), h
return "", -1, err
}
body, _ := ioutil.ReadAll(resp.Body)
resp.Body.Close()
return string(body), resp.StatusCode, nil
}

Expand Down

0 comments on commit 83a0a97

Please sign in to comment.