Skip to content

Commit 83a0a97

Browse files
committed
2 parents 20800f9 + e22f563 commit 83a0a97

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require (
66
github.com/Azure/go-ntlmssp v0.0.0-20211209120228-48547f28849e
77
github.com/fatih/color v1.13.0
88
github.com/nodauf/net-smtp v0.0.0-20220123142515-ae3aa26fb163
9+
github.com/mozillazg/go-unidecode v0.1.1
910
github.com/spf13/cobra v1.2.1
1011
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de // indirect
1112
)

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
196196
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
197197
github.com/nodauf/net-smtp v0.0.0-20220123142515-ae3aa26fb163 h1:ibyr4sPQNrPAK4fGuJxdIyX8tC8ytoTe/ryoQ5YpIRk=
198198
github.com/nodauf/net-smtp v0.0.0-20220123142515-ae3aa26fb163/go.mod h1:bpKTQ3KO0V60W040bsyRGv/w7HxFYDQHGmBwgB4copE=
199+
github.com/mozillazg/go-unidecode v0.1.1 h1:uiRy1s4TUqLbcROUrnCN/V85Jlli2AmDF6EeAXOeMHE=
200+
github.com/mozillazg/go-unidecode v0.1.1/go.mod h1:fYMdhyjni9ZeEmS6OE/GJHDLsF8TQvIVDwYR/drR26Q=
199201
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
200202
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
201203
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

src/modules/linkedin/utils.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"net/url"
88
"strconv"
99
"strings"
10+
11+
"github.com/mozillazg/go-unidecode"
1012
)
1113

1214
// getCompany return a struct that contains all the company of the research
@@ -80,7 +82,7 @@ func (options *Options) getPeople(companyID, start int) []string {
8082
email = strings.ReplaceAll(email, "{f}", name[0][0:1])
8183
email = strings.ReplaceAll(email, "{last}", name[1])
8284
email = strings.ReplaceAll(email, "{l}", name[1][0:1])
83-
email = strings.ToLower(email)
85+
email = strings.ToLower(unidecode.Unidecode(email))
8486
log.Success(email + " - " + people.PrimarySubtitle.Text + " - " + people.SecondarySubtitle.Text)
8587
output = append(output, email)
8688
}

src/modules/searchEngine/gather.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"regexp"
77
"strconv"
88
"strings"
9+
10+
"github.com/mozillazg/go-unidecode"
911
)
1012

1113
// SEARCH_ENGINE contains url for search on Google and Bing
@@ -83,7 +85,7 @@ func (options *Options) Gather() []string {
8385
email = strings.ReplaceAll(email, "{f}", result["FirstName"][0:1])
8486
email = strings.ReplaceAll(email, "{last}", result["LastName"])
8587
email = strings.ReplaceAll(email, "{l}", result["LastName"][0:1])
86-
email = strings.ToLower(email)
88+
email = strings.ToLower(unidecode.Unidecode(email))
8789
log.Success(email)
8890
output = append(output, email)
8991
nbFoundEmail += 1

src/utils/utils.go

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func GetBodyInWebsite(url string, proxy func(*http.Request) (*url.URL, error), h
125125
return "", -1, err
126126
}
127127
body, _ := ioutil.ReadAll(resp.Body)
128+
resp.Body.Close()
128129
return string(body), resp.StatusCode, nil
129130
}
130131

0 commit comments

Comments
 (0)