Skip to content

Commit

Permalink
Add roulette module
Browse files Browse the repository at this point in the history
  • Loading branch information
zer-far committed Jan 27, 2024
1 parent dc8569b commit 0968562
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.19

require (
github.com/buptmiao/parallel v0.0.0-20170103080846-f8134e9f60c6
github.com/corpix/uarand v0.2.0
github.com/zer-far/roulette v0.0.0-20240127203307-9a23bcb19a1c
)
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
github.com/buptmiao/parallel v0.0.0-20170103080846-f8134e9f60c6 h1:LvlqzDHYGWyxuJQj8QzzZPC6nbOBBnfrH28zHY9gLgo=
github.com/buptmiao/parallel v0.0.0-20170103080846-f8134e9f60c6/go.mod h1:FEA3W6N8c6UeqZbc3ZvfRr2mXleMNEXOEp2AzoGjI1o=
github.com/corpix/uarand v0.2.0 h1:U98xXwud/AVuCpkpgfPF7J5TQgr7R5tqT8VZP5KWbzE=
github.com/corpix/uarand v0.2.0/go.mod h1:/3Z1QIqWkDIhf6XWn/08/uMHoQ8JUoTIKc2iPchBOmM=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
github.com/zer-far/roulette v0.0.0-20240127203307-9a23bcb19a1c h1:NuOSbUIaT4q32CSfFqMJ9P+24EioFSPubvX+8Q4YPiY=
github.com/zer-far/roulette v0.0.0-20240127203307-9a23bcb19a1c/go.mod h1:KSvw+JWKm/R6ZZf1HXUPP7w83fFnw9HvcHv452aNj08=
22 changes: 4 additions & 18 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
"time"

"github.com/buptmiao/parallel"
"github.com/corpix/uarand"
"github.com/zer-far/roulette"
)

var (
version = "v1.7.5"
version = "v1.8.0"

banner = fmt.Sprintf(`
__
Expand All @@ -31,20 +31,6 @@ var (
/____/ .___/\__,_/_/ \__/
/_/ ` + version)

referrers = []string{
"https://www.google.com/?q=",
"https://www.facebook.com/",
"https://help.baidu.com/searchResult?keywords=",
"https://steamcommunity.com/market/search?q=",
"https://www.youtube.com/",
"https://www.bing.com/search?q=",
"https://r.search.yahoo.com/",
"https://www.ted.com/search?q=",
"https://play.google.com/store/search?q=",
"https://vk.com/profile.php?auto=",
"https://www.usatoday.com/search/results?q=",
}

reset = "\033[0m"
red = "\033[31m"
green = "\033[32m"
Expand Down Expand Up @@ -132,10 +118,10 @@ func get() {
fmt.Println(err)
}

req.Header.Set("User-Agent", uarand.GetRandom())
req.Header.Set("User-Agent", roulette.GetUserAgent())
req.Header.Add("Pragma", "no-cache") // Used in case https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Pragma
req.Header.Add("Cache-Control", "no-store, no-cache") // Creates more load on web server
req.Header.Set("Referer", referrers[rand.Intn(len(referrers))]+buildblock(rand.Intn(5)+5))
req.Header.Set("Referer", roulette.GetReferrer()+"?q="+buildblock(rand.Intn(5)+5))
req.Header.Set("Keep-Alive", fmt.Sprintf("%d", rand.Intn(10)+100))
req.Header.Set("Connection", "keep-alive")

Expand Down

0 comments on commit 0968562

Please sign in to comment.