first commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
jack0210_@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj01@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj02@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj03@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj04@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj05@hotmail.com|||aaaaAA111!!!
|
||||
yujieccyj06@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj07@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj08@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj09@hotmail.com|||aaaAAA111!!!
|
||||
yujieccyj10@hotmail.com|||aaaAAA111!!!
|
||||
@@ -0,0 +1,173 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type LoginResponse struct {
|
||||
Data struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
TokenType string `json:"token_type"`
|
||||
Token string `json:"token"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type ClaimResponse struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func dailyClaim3DOS(email, password string) string {
|
||||
client := &http.Client{}
|
||||
loginURL := "https://api.dashboard.3dos.io/api/auth/login"
|
||||
loginPayload := map[string]string{
|
||||
"email": email,
|
||||
"password": password,
|
||||
}
|
||||
loginPayloadJSON, _ := json.Marshal(loginPayload)
|
||||
|
||||
loginReq, _ := http.NewRequest("POST", loginURL, bytes.NewBuffer(loginPayloadJSON))
|
||||
loginReq.Header.Set("Accept", "application/json, text/plain, */*")
|
||||
loginReq.Header.Set("Accept-Encoding", "gzip, deflate, br, zstd")
|
||||
loginReq.Header.Set("Accept-Language", "zh-CN,zh;q=0.9")
|
||||
loginReq.Header.Set("Content-Type", "application/json")
|
||||
loginReq.Header.Set("Origin", "https://dashboard.3dos.io")
|
||||
loginReq.Header.Set("Priority", "u=1, i")
|
||||
loginReq.Header.Set("Referer", "https://dashboard.3dos.io/")
|
||||
loginReq.Header.Set("Sec-CH-UA", `"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"`)
|
||||
loginReq.Header.Set("Sec-CH-UA-Mobile", "?0")
|
||||
loginReq.Header.Set("Sec-CH-UA-Platform", `"Windows"`)
|
||||
loginReq.Header.Set("Sec-Fetch-Dest", "empty")
|
||||
loginReq.Header.Set("Sec-Fetch-Mode", "cors")
|
||||
loginReq.Header.Set("Sec-Fetch-Site", "same-site")
|
||||
loginReq.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36")
|
||||
|
||||
loginResp, err := client.Do(loginReq)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("%s: 登录请求失败", email)
|
||||
}
|
||||
defer loginResp.Body.Close()
|
||||
|
||||
if loginResp.StatusCode != 200 {
|
||||
return fmt.Sprintf("%s: 登录失败", email)
|
||||
}
|
||||
|
||||
var loginData LoginResponse
|
||||
json.NewDecoder(loginResp.Body).Decode(&loginData)
|
||||
|
||||
token := loginData.Data.AccessToken
|
||||
if token == "" {
|
||||
token = loginData.Data.Token
|
||||
}
|
||||
tokenType := loginData.Data.TokenType
|
||||
|
||||
if token == "" || tokenType == "" {
|
||||
return fmt.Sprintf("%s: 登录响应中未找到 Token 或 Token 类型", email)
|
||||
}
|
||||
|
||||
authorizationHeader := fmt.Sprintf("%s %s", tokenType, token)
|
||||
|
||||
optionsURL := "https://api.dashboard.3dos.io/api/claim-reward"
|
||||
optionsReq, _ := http.NewRequest("OPTIONS", optionsURL, nil)
|
||||
optionsReq.Header.Set("Accept", "*/*")
|
||||
optionsReq.Header.Set("Accept-Encoding", "gzip, deflate, br, zstd")
|
||||
optionsReq.Header.Set("Accept-Language", "zh-CN,zh;q=0.9")
|
||||
optionsReq.Header.Set("Access-Control-Request-Headers", "authorization,cache-control,content-type,expires,pragma")
|
||||
optionsReq.Header.Set("Access-Control-Request-Method", "POST")
|
||||
optionsReq.Header.Set("Origin", "https://dashboard.3dos.io")
|
||||
optionsReq.Header.Set("Priority", "u=1, i")
|
||||
optionsReq.Header.Set("Referer", "https://dashboard.3dos.io/")
|
||||
optionsReq.Header.Set("Sec-Fetch-Dest", "empty")
|
||||
optionsReq.Header.Set("Sec-Fetch-Mode", "cors")
|
||||
optionsReq.Header.Set("Sec-Fetch-Site", "same-site")
|
||||
optionsReq.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36")
|
||||
|
||||
optionsResp, err := client.Do(optionsReq)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("%s: OPTIONS 请求失败", email)
|
||||
}
|
||||
defer optionsResp.Body.Close()
|
||||
|
||||
claimURL := "https://api.dashboard.3dos.io/api/claim-reward"
|
||||
claimPayload := map[string]string{
|
||||
"id": "daily-reward-api",
|
||||
}
|
||||
claimPayloadJSON, _ := json.Marshal(claimPayload)
|
||||
|
||||
claimReq, _ := http.NewRequest("POST", claimURL, bytes.NewBuffer(claimPayloadJSON))
|
||||
claimReq.Header.Set("Accept", "application/json, text/plain, */*")
|
||||
claimReq.Header.Set("Authorization", authorizationHeader)
|
||||
claimReq.Header.Set("Cache-Control", "no-cache")
|
||||
claimReq.Header.Set("Content-Type", "application/json")
|
||||
claimReq.Header.Set("Expires", "0")
|
||||
claimReq.Header.Set("Origin", "https://dashboard.3dos.io")
|
||||
claimReq.Header.Set("Pragma", "no-cache")
|
||||
claimReq.Header.Set("Priority", "u=1, i")
|
||||
claimReq.Header.Set("Referer", "https://dashboard.3dos.io/")
|
||||
claimReq.Header.Set("Sec-CH-UA", `"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"`)
|
||||
claimReq.Header.Set("Sec-CH-UA-Mobile", "?0")
|
||||
claimReq.Header.Set("Sec-CH-UA-Platform", `"Windows"`)
|
||||
claimReq.Header.Set("Sec-Fetch-Dest", "empty")
|
||||
claimReq.Header.Set("Sec-Fetch-Mode", "cors")
|
||||
claimReq.Header.Set("Sec-Fetch-Site", "same-site")
|
||||
claimReq.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36")
|
||||
|
||||
claimResp, err := client.Do(claimReq)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("%s: claim-reward 请求失败", email)
|
||||
}
|
||||
defer claimResp.Body.Close()
|
||||
|
||||
var claimData ClaimResponse
|
||||
json.NewDecoder(claimResp.Body).Decode(&claimData)
|
||||
|
||||
if claimResp.StatusCode != 200 && claimResp.StatusCode != 429 {
|
||||
return fmt.Sprintf("%s: claim 报错: %s, 状态码%d", email, claimData.Message, claimResp.StatusCode)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s: %s", email, claimData.Message)
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("开始执行...")
|
||||
|
||||
accountList := []string{
|
||||
"jack0210_@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj01@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj02@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj03@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj04@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj05@hotmail.com|||aaaaAA111!!!",
|
||||
"yujieccyj06@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj07@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj08@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj09@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj10@hotmail.com|||aaaAAA111!!!",
|
||||
}
|
||||
|
||||
var wg sync.WaitGroup
|
||||
results := make(chan string, len(accountList))
|
||||
|
||||
for _, account := range accountList {
|
||||
if account == "" {
|
||||
continue
|
||||
}
|
||||
wg.Add(1)
|
||||
go func(acc string) {
|
||||
defer wg.Done()
|
||||
email, password := strings.Split(acc, "|||")[0], strings.Split(acc, "|||")[1]
|
||||
results <- dailyClaim3DOS(email, password)
|
||||
}(account)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
close(results)
|
||||
|
||||
for result := range results {
|
||||
fmt.Println(result)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from httpx import Client
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
|
||||
def daily_claim_3dos(email, password):
|
||||
client = Client(proxy="http://127.0.0.1:7890")
|
||||
# client = Client()
|
||||
|
||||
login_url = "https://api.dashboard.3dos.io/api/auth/login"
|
||||
login_headers = {
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Content-Type": "application/json",
|
||||
"Origin": "https://dashboard.3dos.io",
|
||||
"Priority": "u=1, i",
|
||||
"Referer": "https://dashboard.3dos.io/",
|
||||
"Sec-CH-UA": '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
|
||||
"Sec-CH-UA-Mobile": "?0",
|
||||
"Sec-CH-UA-Platform": '"Windows"',
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-site",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
|
||||
}
|
||||
login_payload = {
|
||||
"email": email,
|
||||
"password": password
|
||||
}
|
||||
|
||||
try:
|
||||
login_response = client.post(login_url, json=login_payload, headers=login_headers)
|
||||
except Exception as e:
|
||||
print(f"登录请求失败:{e}")
|
||||
return False
|
||||
|
||||
if login_response.status_code == 200:
|
||||
# print(f"{email}: 登录成功!")
|
||||
login_data = login_response.json()
|
||||
# print("登录响应内容:", login_data)
|
||||
|
||||
data = login_data.get("data")
|
||||
token = data.get("access_token") or data.get("token")
|
||||
token_type = data.get("token_type")
|
||||
if not token or not token_type:
|
||||
print("登录响应中未找到 Token 或 Token 类型!")
|
||||
return False
|
||||
|
||||
authorization_header = f"{token_type} {token}"
|
||||
else:
|
||||
print("登录失败!")
|
||||
print("登录响应状态码:", login_response.status_code)
|
||||
print("登录响应内容:", login_response.json())
|
||||
return False
|
||||
|
||||
options_url = "https://api.dashboard.3dos.io/api/claim-reward"
|
||||
options_headers = {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Access-Control-Request-Headers": "authorization,cache-control,content-type,expires,pragma",
|
||||
"Access-Control-Request-Method": "POST",
|
||||
"Origin": "https://dashboard.3dos.io",
|
||||
"Priority": "u=1, i",
|
||||
"Referer": "https://dashboard.3dos.io/",
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-site",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
|
||||
}
|
||||
|
||||
try:
|
||||
options_response = client.options(options_url, headers=options_headers)
|
||||
except Exception as e:
|
||||
print(f"OPTIONS 请求失败:{e}")
|
||||
return False
|
||||
|
||||
# print("OPTIONS 请求响应状态码:", options_response.status_code)
|
||||
|
||||
claim_url = "https://api.dashboard.3dos.io/api/claim-reward"
|
||||
claim_headers = {
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Authorization": authorization_header,
|
||||
"Cache-Control": "no-cache",
|
||||
"Content-Type": "application/json",
|
||||
"Expires": "0",
|
||||
"Origin": "https://dashboard.3dos.io",
|
||||
"Pragma": "no-cache",
|
||||
"Priority": "u=1, i",
|
||||
"Referer": "https://dashboard.3dos.io/",
|
||||
"Sec-CH-UA": '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
|
||||
"Sec-CH-UA-Mobile": "?0",
|
||||
"Sec-CH-UA-Platform": '"Windows"',
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-site",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
|
||||
}
|
||||
claim_payload = {
|
||||
"id": "daily-reward-api"
|
||||
}
|
||||
|
||||
try:
|
||||
claim_response = client.post(claim_url, json=claim_payload, headers=claim_headers)
|
||||
except Exception as e:
|
||||
print(f"{email} claim-reward 请求失败:{e}")
|
||||
return False
|
||||
|
||||
message = claim_response.json().get("message")
|
||||
|
||||
if claim_response.status_code not in [200, 429]:
|
||||
print(f"{email} claim 报错: {message}, 状态码{claim_response.status_code}")
|
||||
return False
|
||||
|
||||
result = f"{email}: {message}"
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
print("开始执行...")
|
||||
|
||||
account_list = [
|
||||
"jack0210_@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj01@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj02@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj03@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj04@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj05@hotmail.com|||aaaaAA111!!!",
|
||||
"yujieccyj06@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj07@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj08@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj09@hotmail.com|||aaaAAA111!!!",
|
||||
"yujieccyj10@hotmail.com|||aaaAAA111!!!",
|
||||
]
|
||||
|
||||
with ThreadPoolExecutor(max_workers=len(account_list)) as executor:
|
||||
futures = []
|
||||
for account in account_list:
|
||||
email, password = account.split("|||")
|
||||
futures.append(executor.submit(daily_claim_3dos, email, password))
|
||||
|
||||
for future in as_completed(futures):
|
||||
result = future.result()
|
||||
if result:
|
||||
print(result)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,33 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
Email string
|
||||
Password string
|
||||
}
|
||||
|
||||
func main() {
|
||||
// 直接写死的账户信息
|
||||
accounts := []Account{
|
||||
{Email: "jack0210_@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj01@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj02@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj03@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj04@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj05@hotmail.com", Password: "aaaaAA111!!!"},
|
||||
{Email: "yujieccyj06@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj07@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj08@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj09@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
{Email: "yujieccyj10@hotmail.com", Password: "aaaAAA111!!!"},
|
||||
}
|
||||
|
||||
// 遍历账户并执行操作
|
||||
for _, account := range accounts {
|
||||
fmt.Printf("Processing account: %s\n", account.Email)
|
||||
// 在这里添加您需要的操作
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
anyio==4.8.0
|
||||
certifi==2025.1.31
|
||||
h11==0.14.0
|
||||
httpcore==1.0.7
|
||||
httpx==0.27.2
|
||||
idna==3.10
|
||||
setuptools==75.8.0
|
||||
sniffio==1.3.1
|
||||
typing_extensions==4.12.2
|
||||
wheel==0.45.1
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"cookies": [
|
||||
"_ga=GA1.1.691286698.1738712937; privy-session=privy.agnthub.ai; _ga_HZ81TDGZGW=GS1.1.1741104719.42.1.1741105531.0.0.0; privy-token=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlVZWDlVRXppSll1ajlpeTFEbmc5NnY3OXZQcGMtaV9DdXU0bm0wWnVCVkkifQ.eyJzaWQiOiJjbTZ3ZXR2eXQwMDBmOHNvajR3YXh0ZjQ4IiwiaXNzIjoicHJpdnkuaW8iLCJpYXQiOjE3NDExNDM1ODUsImF1ZCI6ImNtNmplc3V4ZDAwYTlvam8waTlybHh1ZGsiLCJzdWIiOiJkaWQ6cHJpdnk6Y202cjUzcHg2MDBid3A1aHlncW0zc3pxayIsImV4cCI6MTc0MTE0NzE4NX0.7DnKA0WG5b2CV2C5-iJlF0miKNP9t2ofGJbRe6C4-SOPnSm747ceG9RGUM15b1VdUFOOmXjc4vxUa4rlFVlbtg; privy-id-token=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlVZWDlVRXppSll1ajlpeTFEbmc5NnY3OXZQcGMtaV9DdXU0bm0wWnVCVkkifQ.eyJjciI6IjE3Mzg3MTM0NjIiLCJsaW5rZWRfYWNjb3VudHMiOiJbe1widHlwZVwiOlwidHdpdHRlcl9vYXV0aFwiLFwic3ViamVjdFwiOlwiMTYzOTM3MzU1ODA5Mzg0MDM4NFwiLFwidXNlcm5hbWVcIjpcIkFsaXNoYU1hcnQxNjkzOFwiLFwibmFtZVwiOlwiQWxpc2hhIE1hcnRpblwiLFwicGZwXCI6XCJodHRwczovL3Bicy50d2ltZy5jb20vcHJvZmlsZV9pbWFnZXMvMTYzOTM3NDE0MDM1OTc0MTQ0MC9LUXg0U0h6al9ub3JtYWwuanBnXCIsXCJsdlwiOjE3MzkwMzIxMzB9LHtcInR5cGVcIjpcIndhbGxldFwiLFwiYWRkcmVzc1wiOlwiMHhjNTVEM2VhNEZmMTVkRDdGMTQ2MjUzNTEyOEZEYmZBQTlGYmQzZUEzXCIsXCJjaGFpbl90eXBlXCI6XCJldGhlcmV1bVwiLFwid2FsbGV0X2NsaWVudF90eXBlXCI6XCJwcml2eVwiLFwibHZcIjoxNzM4NzEzNDczfSx7XCJ0eXBlXCI6XCJkaXNjb3JkX29hdXRoXCIsXCJzdWJqZWN0XCI6XCI5NTI1MTEzNDk0MTY2NjEwMTJcIixcInVzZXJuYW1lXCI6XCJtYXJjaDQwNjQjMFwiLFwibHZcIjoxNzM4NzYzMzE5fV0iLCJpc3MiOiJwcml2eS5pbyIsImlhdCI6MTc0MTE0MzU4NSwiYXVkIjoiY202amVzdXhkMDBhOW9qbzBpOXJseHVkayIsInN1YiI6ImRpZDpwcml2eTpjbTZyNTNweDYwMGJ3cDVoeWdxbTNzenFrIiwiZXhwIjoxNzQxMTQ3MTg1fQ.esW33-NgR46Mf5HMA3rcNg06eigNvtExRNVk9jw94CWvVO4VrUktZ9XUsBoJrZKvs9lUu3n2kr_e14iS_aZzUA"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import time
|
||||
import os
|
||||
import json
|
||||
import httpx
|
||||
|
||||
|
||||
class AgntTask:
|
||||
def __init__(self, cookies_list):
|
||||
self.cookies_list = cookies_list
|
||||
|
||||
def daily_task(self):
|
||||
for cookies in self.cookies_list:
|
||||
url = "https://hub-api.agnthub.ai/api/daily-rewards/claim"
|
||||
headers = {
|
||||
"accept": "application/json, text/plain, */*",
|
||||
"accept-encoding": "gzip, deflate, br, zstd",
|
||||
"accept-language": "zh-CN,zh;q=0.9",
|
||||
"content-length": "0",
|
||||
"cookie": cookies,
|
||||
"origin": "https://quests.agnthub.ai",
|
||||
"priority": "u=1, i",
|
||||
"referer": "https://quests.agnthub.ai/",
|
||||
"sec-ch-ua": '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "same-site",
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
|
||||
}
|
||||
|
||||
try:
|
||||
response = httpx.post(url, headers=headers)
|
||||
print(response.json())
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
|
||||
def upload_task(self):
|
||||
for cookies in self.cookies_list:
|
||||
url = "https://hub-api.agnthub.ai/api/tasks/make-ai-laugh/34ecad1e-94df-48ba-b5f4-242fdd9d6546"
|
||||
headers = {
|
||||
"accept": "application/json, text/plain, */*",
|
||||
"accept-encoding": "gzip, deflate, br, zstd",
|
||||
"accept-language": "zh-CN,zh;q=0.9",
|
||||
"content-length": "0",
|
||||
"cookie": cookies,
|
||||
"origin": "https://quests.agnthub.ai",
|
||||
"priority": "u=1, i",
|
||||
"referer": "https://quests.agnthub.ai/",
|
||||
"sec-ch-ua": '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "same-site",
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
|
||||
}
|
||||
|
||||
try:
|
||||
response = httpx.post(url, headers=headers)
|
||||
print(response.json())
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
|
||||
def tasks(self):
|
||||
tasks_list = [
|
||||
"6813de78-f821-4a84-8e8c-3aa89c15b2aa",
|
||||
"fce2e806-a6c7-4de2-abc2-260d13bcfb2f",
|
||||
"0bcb7d19-7c63-4933-96b0-00141ce54dbe",
|
||||
"2f3241c5-29a0-4f47-acf3-9370baf94e74",
|
||||
"d2b35062-40c1-48b8-bca5-c48779ccc66d",
|
||||
"ab2fd158-b894-47bc-aadb-645259b46cc0",
|
||||
"3861cd8e-5393-4285-b6ee-29a5ee301ee5",
|
||||
"1a75844a-a108-4fbd-bfc3-c7476b26b73d",
|
||||
"217e2f67-c110-4ef7-a636-8ac0623df3e8",
|
||||
"49c1db40-8ecf-4454-af0a-fcc81b222135",
|
||||
"2e6ff98c-132b-4886-8f38-6c89d1a7b02a",
|
||||
"9fc278e8-4045-4130-9f52-6ce3b713318c",
|
||||
"4f913da3-58b6-4636-a2c2-912fb01c73d4",
|
||||
"6216f4e1-eafb-4442-a5d4-5b1830f89655",
|
||||
"ebbba0a4-96d9-4fa4-85f9-6fb07fbc282a",
|
||||
"5172f361-d28e-4aa2-a3ba-2adfe5057539",
|
||||
"f81146e9-9ef9-4979-b0a0-437ea5c3e1bb",
|
||||
"22301ec3-3a75-4758-a886-ab768312ffe5",
|
||||
"6debaef3-844e-40f3-be6d-d99a6fd9f2a1",
|
||||
"932d0c29-22ad-4be5-92b4-fc3a2e13aaed",
|
||||
"05027b13-88a3-42a4-992a-0ce2a53068d4",
|
||||
"9e0addfa-51fd-4f3b-a6f2-8dbe301265aa",
|
||||
"4a42ba64-7822-469c-8899-bc07b5dd5d69",
|
||||
"516d941e-b006-4744-a190-6c3207750854",
|
||||
"bf9e7362-5eed-4110-bbe3-1289722a36b3",
|
||||
"7eed7668-e71a-42ed-98ac-a0ded8bc0296",
|
||||
"2cac41ba-36dd-4389-91b6-f8ee840083db",
|
||||
"6f888d49-2b59-4ba9-a7be-199dceff45ab"
|
||||
]
|
||||
|
||||
for cookies in cookies_list:
|
||||
for tasks in tasks_list:
|
||||
url = "https://hub-api.agnthub.ai/api/tasks/start/" + tasks
|
||||
|
||||
headers = {
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Content-Length": "0",
|
||||
"Cookie": cookies,
|
||||
"Origin": "https://quests.agnthub.ai",
|
||||
"Priority": "u=1, i",
|
||||
"Referer": "https://quests.agnthub.ai/",
|
||||
"Sec-CH-UA": '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
|
||||
"Sec-CH-UA-Mobile": "?0",
|
||||
"Sec-CH-UA-Platform": '"Windows"',
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-site",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
|
||||
}
|
||||
|
||||
for retry in range(1, 4):
|
||||
try:
|
||||
response = httpx.post(url, headers=headers)
|
||||
|
||||
if response.status_code == 201:
|
||||
print("请求成功!")
|
||||
print(response.json())
|
||||
break
|
||||
else:
|
||||
print(f"请求失败,状态码:{response.status_code}")
|
||||
print(response.text)
|
||||
except Exception as e:
|
||||
print(f"出现错误:{e}\n重试...")
|
||||
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "config.json")
|
||||
try:
|
||||
with open(config_path, "r", encoding="utf-8") as file:
|
||||
config_data = json.load(file)
|
||||
except Exception as e:
|
||||
print(f"读取配置失败:{e}")
|
||||
exit(1)
|
||||
|
||||
cookies_list = config_data.get("cookies", [])
|
||||
|
||||
A = AgntTask(cookies_list)
|
||||
|
||||
A.daily_task()
|
||||
A.upload_task()
|
||||
|
||||
A.tasks()
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1 @@
|
||||
{"version": "1.1.3", "username": "yujieccyj01@hotmail.com", "password": "aaaAAA111!!!", "appid": "67bc1b9b20f45f80e7c94634"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,285 @@
|
||||
import base64
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
import os.path
|
||||
import time
|
||||
import requests
|
||||
import ddddocr
|
||||
|
||||
# 配置日志
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
# 配置文件路径
|
||||
CONFIG_FILE = "config.json"
|
||||
|
||||
|
||||
# 初始化配置
|
||||
def init_config():
|
||||
if not os.path.exists(CONFIG_FILE):
|
||||
with open(CONFIG_FILE, "w", encoding="utf-8") as f:
|
||||
json.dump({}, f)
|
||||
|
||||
|
||||
# 读取配置
|
||||
def load_config():
|
||||
with open(CONFIG_FILE, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
|
||||
# 保存配置
|
||||
def save_config(config):
|
||||
with open(CONFIG_FILE, "w", encoding="utf-8") as f:
|
||||
json.dump(config, f, indent=4)
|
||||
|
||||
|
||||
# 获取版本号
|
||||
def get_version(config):
|
||||
if "version" not in config:
|
||||
# 这里可以添加获取版本号的逻辑
|
||||
config["version"] = "1.1.3"
|
||||
save_config(config)
|
||||
return config["version"]
|
||||
|
||||
|
||||
# 获取App ID
|
||||
def get_app_id(config):
|
||||
if "appid" not in config:
|
||||
response = requests.get(
|
||||
f"https://www.aeropres.in/chromeapi/dawn/v1/appid/getappid?app_v={get_version(config)}",
|
||||
proxies=config.get("proxy"),
|
||||
headers={
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"},
|
||||
verify=False,
|
||||
timeout=15
|
||||
)
|
||||
if response.status_code != 200:
|
||||
raise Exception("获取appid失败")
|
||||
config["appid"] = response.json()["data"]["appid"]
|
||||
save_config(config)
|
||||
return config["appid"]
|
||||
|
||||
|
||||
# 获取Puzzle ID
|
||||
def get_puzzle_id(config):
|
||||
app_id = get_app_id(config)
|
||||
headers = {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Origin": "chrome-extension://fpdkjdnhkakefebpekbdhillbhonfjjp",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
|
||||
"priority": "u=1, i",
|
||||
"sec-ch-ua": '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "cross-site",
|
||||
}
|
||||
response = requests.get(
|
||||
f"https://www.aeropres.in/chromeapi/dawn/v1/puzzle/get-puzzle?appid={app_id}",
|
||||
proxies=config.get("proxy"),
|
||||
headers=headers,
|
||||
verify=False,
|
||||
timeout=15
|
||||
)
|
||||
if response.status_code not in [200, 201]:
|
||||
raise Exception("获取puzzle_id失败")
|
||||
res_json = response.json()
|
||||
if not res_json.get('success', False):
|
||||
raise Exception("获取puzzle_id结果失败")
|
||||
return res_json["puzzle_id"]
|
||||
|
||||
|
||||
# 获取Puzzle Code
|
||||
def get_puzzle_code(config):
|
||||
puzzle_id = get_puzzle_id(config)
|
||||
headers = {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Origin": "chrome-extension://fpdkjdnhkakefebpekbdhillbhonfjjp",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
|
||||
"priority": "u=1, i",
|
||||
"sec-ch-ua": '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "cross-site",
|
||||
}
|
||||
response = requests.get(
|
||||
f"https://www.aeropres.in/chromeapi/dawn/v1/puzzle/get-puzzle-image?puzzle_id={puzzle_id}&appid={get_app_id(config)}",
|
||||
proxies=config.get("proxy"),
|
||||
headers=headers,
|
||||
verify=False,
|
||||
timeout=15
|
||||
)
|
||||
if response.status_code != 200:
|
||||
raise Exception("获取puzzle_url失败")
|
||||
res_json = response.json()
|
||||
if not res_json.get('success', False):
|
||||
raise Exception("获取puzzle_url结果失败")
|
||||
imgBase64 = res_json["imgBase64"]
|
||||
data = base64.b64decode(imgBase64)
|
||||
return get_code_with_img(puzzle_id, img_data=data)
|
||||
|
||||
|
||||
# 获取验证码
|
||||
def get_code_with_img(puzzle_id, img_data):
|
||||
print(puzzle_id)
|
||||
with open(f'{str(int(time.time()))}.jpg', 'wb') as file:
|
||||
file.write(img_data)
|
||||
return False
|
||||
|
||||
|
||||
# 获取Token
|
||||
def get_token(config):
|
||||
if "token" not in config:
|
||||
retry_count = config.get('retry', 3)
|
||||
code = ""
|
||||
puzzle_id = ""
|
||||
while retry_count > 0:
|
||||
try:
|
||||
puzzle_id = get_puzzle_id(config)
|
||||
code = get_puzzle_code(config)
|
||||
break
|
||||
except Exception as e:
|
||||
logging.error(f"获取token失败,{e}")
|
||||
retry_count -= 1
|
||||
if not code or not puzzle_id:
|
||||
return False
|
||||
data = {
|
||||
"username": config.get("username", ""),
|
||||
"password": config.get("password", ""),
|
||||
"logindata": {"_v": {"version": get_version(config)},
|
||||
"datetime": datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")[:-3]},
|
||||
"puzzle_id": puzzle_id,
|
||||
"ans": code,
|
||||
"appid": get_app_id(config),
|
||||
}
|
||||
headers = {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Origin": "chrome-extension://fpdkjdnhkakefebpekbdhillbhonfjjp",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
|
||||
"priority": "u=1, i",
|
||||
"sec-ch-ua": '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "cross-site",
|
||||
}
|
||||
retry_count = config.get('retry', 3)
|
||||
while retry_count > 0:
|
||||
try:
|
||||
response = requests.post(
|
||||
f"https://www.aeropres.in/chromeapi/dawn/v1/user/login/v2?appid={get_app_id(config)}",
|
||||
json=data,
|
||||
proxies=config.get("proxy"),
|
||||
verify=False,
|
||||
timeout=15,
|
||||
headers=headers
|
||||
)
|
||||
if response.status_code != 200:
|
||||
raise Exception("获取token失败")
|
||||
res_json = response.json()
|
||||
if not res_json.get('success', False):
|
||||
raise Exception("获取token结果失败")
|
||||
config["token"] = res_json["data"]["token"]
|
||||
save_config(config)
|
||||
break
|
||||
except Exception as e:
|
||||
logging.error(f"获取token失败,{e}")
|
||||
retry_count -= 1
|
||||
return config.get("token", "")
|
||||
|
||||
|
||||
# 获取积分
|
||||
def get_point(config):
|
||||
headers = {
|
||||
"Authorization": f"Bearer {config.get('token', '')}",
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
|
||||
"sec-ch-ua": '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
}
|
||||
response = requests.get(
|
||||
f"https://www.aeropres.in/api/atom/v1/userreferral/getpoint?appid={get_app_id(config)}",
|
||||
headers=headers,
|
||||
proxies=config.get("proxy"),
|
||||
verify=False,
|
||||
timeout=15
|
||||
)
|
||||
if response.status_code != 200:
|
||||
raise Exception(f"获取积分失败,{response.text}")
|
||||
if not response.json().get('success', False):
|
||||
raise Exception(f"获取积分失败,{response.json()}")
|
||||
|
||||
|
||||
# 保持活跃
|
||||
def keep_alive(config):
|
||||
headers = {
|
||||
"Authorization": f"Bearer {config.get('token', '')}",
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
|
||||
}
|
||||
data = {
|
||||
"username": config.get("username", ""),
|
||||
"extensionid": "fpdkjdnhkakefebpekbdhillbhonfjjp",
|
||||
"numberoftabs": 0,
|
||||
"_v": get_version(config)
|
||||
}
|
||||
response = requests.post(
|
||||
f"https://www.aeropres.in/chromeapi/dawn/v1/userreward/keepalive?appid={get_app_id(config)}",
|
||||
json=data,
|
||||
headers=headers,
|
||||
proxies=config.get("proxy"),
|
||||
verify=False,
|
||||
timeout=15
|
||||
)
|
||||
if response.status_code != 200:
|
||||
raise Exception(f"保持活跃失败,{response.text}")
|
||||
if not response.json().get('success', False):
|
||||
raise Exception(f"保持活跃失败,{response.json()}")
|
||||
|
||||
|
||||
# 主函数
|
||||
def main():
|
||||
init_config()
|
||||
config = load_config()
|
||||
while True:
|
||||
token = get_token(config)
|
||||
if not token:
|
||||
time.sleep(60)
|
||||
del config['token']
|
||||
save_config(config)
|
||||
continue
|
||||
retry_count = 5
|
||||
while retry_count > 0:
|
||||
err = False
|
||||
try:
|
||||
get_point(config)
|
||||
except Exception as e:
|
||||
logging.error(f"获取积分失败,{e}")
|
||||
err = True
|
||||
try:
|
||||
keep_alive(config)
|
||||
except Exception as e:
|
||||
logging.error(f"保持活跃失败,{e}")
|
||||
err = True
|
||||
if not err:
|
||||
retry_count = 5
|
||||
else:
|
||||
retry_count -= 1
|
||||
if retry_count <= 0:
|
||||
break
|
||||
time.sleep(5 * 60)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import ddddocr
|
||||
|
||||
with open('aa.jpg', 'rb') as f:
|
||||
img_bytes = f.read()
|
||||
res = ddddocr.DdddOcr(show_ad=False).classification(img_bytes)
|
||||
print(res)
|
||||
Reference in New Issue
Block a user