This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package formatter | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"strings" | |
) | |
type Formatter interface { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const proxies = fs.readFileSync('proxies.txt', 'utf-8'); | |
let splitProxies = proxies.split('\n'); | |
let output = splitProxies.map((proxy, index) => { | |
sanatizeProxy = proxy.replace('\r', ''); | |
if (splitProxies[index + 1] != undefined) { | |
return `"${sanatizeProxy}",`; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func genNonce(length int) string { | |
const charset = "abcdefghijklmnopqrstuvwxyz" + | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
nonce := "" | |
for i := 0; i < length; i++ { | |
rand.Seed(time.Now().UnixNano()) | |
nonce += strings.Split(charset, "")[rand.Intn(len(strings.Split(charset, "")))] | |
} | |
return strings.ToUpper(nonce) | |
} |