Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions Go365.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ func wait(wt int) {
time.Sleep(waitTime)
}

// funtion to randomize the list of proxy servers
// function to randomize the list of proxy servers
func randomProxy(proxies []string) string {
var proxyString string

// selet a random proxy server from the list provided
// select a random proxy server from the list provided
if len(proxies) > 0 {
proxyString = proxies[rand.Intn(len(proxies))]
}
Expand Down Expand Up @@ -160,7 +160,7 @@ func randomProxy(proxies []string) string {
proxyString = "bp"
}
// I have NO IDEA why this works. Literally need to sandwich the defer between the returns. plz send help...
return proxyString
// return proxyString
defer response.Body.Close()
return proxyString

Expand Down Expand Up @@ -603,14 +603,8 @@ func main() {
if opt.flagEndpoint == "rst" {
proxyInput := ""
if opt.flagProxyFile != "" {
proxyInput := "bp"
for {
for proxyInput := "bp"; proxyInput == "bp"; {
proxyInput = randomProxy(proxyList)
if proxyInput == "bp" {
proxyInput = randomProxy(proxyList)
} else {
break
}
}
}
result, col := doTheStuffRst(user, pass, proxyInput)
Expand All @@ -629,14 +623,8 @@ func main() {
} else if opt.flagEndpoint == "graph" {
proxyInput := ""
if opt.flagProxyFile != "" {
proxyInput := "bp"
for {
for proxyInput := "bp"; proxyInput == "bp"; {
proxyInput = randomProxy(proxyList)
if proxyInput == "bp" {
proxyInput = randomProxy(proxyList)
} else {
break
}
}
}
result, col := doTheStuffGraph(user, pass, proxyInput)
Expand Down