jack 6 月之前
父節點
當前提交
f4414ba9a0

+ 1 - 0
api_tools/3dos/daily_3dos.py

@@ -6,6 +6,7 @@ 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 = {

+ 0 - 1
api_tools/magicnewton_roll/config.txt

@@ -1 +0,0 @@
-_ga=GA1.1.610447331.1739317157; __Secure-next-auth.callback-url=https%3A%2F%2Fportal.magicnewton.com; __Host-next-auth.csrf-token=53050a9c7d088d4bd79779264df04ee9d6066f47880c821170896bdaf5afeb4b%7Cac78d88f5ffc08318561307c6ecbb492cf2ee2b3b6b6d821a3e25b8c13a63e24; wagmi.store={"state":{"connections":{"__type":"Map","value":[]},"chainId":1,"current":null},"version":2}; _ga_2BFPMRZ2M3=GS1.1.1741150766.31.1.1741150769.0.0.0; __Secure-next-auth.session-token=eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..DXHUeefu2S-J7WP1.hrfMTYmqiA-ZANO6TuJECUr38IUvzlMqdwkDr8Ju6zXdhtB6H2HjM-kCS-TcXV0sI69XKK5zddPmIuJw4IwPah9KWShnIwLwTg1bEMMCiDjW-XmzTYDPk6MjuEpQ255gl19QSOibq7xhjbG5tqOrE77RJeyMdyxuJSgt6cmmf7O5wnb1EBloHVAI5CGDvwOPLJLYShGx2xOed311zqJXyJpuMiGoB9juUUoOECsFMIllNDQeOpo0p0jMGefr7YhX722Q0MaFi-RhHdpPnQMlGHEn8QTFTmlUvLEzCEL5BoOLUw.VmOIIif_Bn7WBX1-G_ZRBg

+ 0 - 55
api_tools/magicnewton_roll/main.py

@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-import time
-import os
-import json
-import httpx
-
-class DuDog:
-    def __init__(self, cookies_list):
-        self.cookies_list = cookies_list
-
-    def roll(self):
-        url = "https://www.magicnewton.com/portal/api/userQuests"
-
-        for cookies in self.cookies_list:
-            headers = {
-                "accept": "*/*",
-                "accept-encoding": "gzip, deflate, br, zstd",
-                "accept-language": "zh-CN,zh;q=0.9",
-                "content-type": "application/json",
-                "cookie": cookies,
-                "origin": "https://www.magicnewton.com",
-                "priority": "u=1, i",
-                "referer": "https://www.magicnewton.com/portal/rewards",
-                "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-origin",
-                "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"
-            }
-            payload = {"questId": "f56c760b-2186-40cb-9cbc-3af4a3dc20e2", "metadata": {"action": "ROLL"}}
-
-            for times in range(6):
-                try:
-                    response = httpx.post(url, headers=headers, json=payload)
-                    print(response.json())
-                    if response.json().get('message') == 'Quest already completed':
-                        print('Is Done!')
-                        break
-                except Exception as e:
-                    print(str(e))
-                time.sleep(3)
-
-if __name__ == '__main__':
-    config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "config.txt")
-    try:
-        with open(config_path, "r", encoding="utf-8") as file:
-            cookies_list = file.readlines()
-    except Exception as e:
-        print(f"读取配置失败:{e}")
-        exit(1)
-
-    D = DuDog(cookies_list)
-    D.roll()

+ 0 - 10
auto_web3_click/base_ref/move_mouse.py

@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-import pyautogui
-
-# 获取屏幕分辨率
-screen_width, screen_height = pyautogui.size()
-
-# 计算目标坐标(例如,屏幕宽度的20%和高度的30%)
-x = int(screen_width * 0.2)  # 20% 的屏幕宽度
-y = int(screen_height * 0.3)  # 30% 的屏幕高度
-pyautogui.moveTo(100, 100)

+ 0 - 33
auto_web3_click/base_ref/screen_percentage.py

@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-import pyautogui
-import tkinter as tk
-
-
-def update_position():
-    x, y = pyautogui.position()
-    screen_width, screen_height = pyautogui.size()
-    x_percent = (x / screen_width) * 100
-    y_percent = (y / screen_height) * 100
-    label.config(text=f"X: {x_percent:.2f}%\nY: {y_percent:.2f}%")
-    root.after(100, update_position)  # 每100毫秒更新一次
-
-
-# 创建主窗口
-root = tk.Tk()
-root.title("鼠标位置")
-
-# 设置窗口大小(稍微大一点)
-root.geometry("160x80")  # 宽度200像素,高度100像素
-
-# 设置字体大小(稍微大一点)
-font_style = ("Arial", 14)  # 使用Arial字体,字号12
-
-# 创建一个标签用于显示鼠标位置百分比
-label = tk.Label(root, text="等待中...", font=font_style)
-label.pack(pady=10)  # 垂直方向上留出10像素的间距
-
-# 启动更新位置的函数
-update_position()
-
-# 运行主循环
-root.mainloop()

+ 0 - 73
clash_fusion/main.py

@@ -1,73 +0,0 @@
-from nicegui import ui
-
-def expand_all_iframes():
-    for i in range(1, 11):
-        ui.run_javascript(f"var ifr = document.getElementById('iframe{i}'); if (ifr) {{ var links = ifr.contentWindow.document.querySelectorAll('a'); links.forEach(function(link) {{ if (link.textContent.includes('设置')) {{ link.click(); }} }}); }}")
-
-
-def speed_test_all_iframes():
-    # 在这里实现一键测速的功能
-    pass
-
-
-with ui.row().classes('w-full justify-center items-center'):
-    with ui.button('展开').on('click', expand_all_iframes):
-        pass
-    with ui.button('一键测速').on('click', speed_test_all_iframes):
-        pass
-
-with ui.row().classes('w-full justify-center gap-4'):
-    with ui.column().classes('items-center'):
-        with ui.label('01').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe1" src="http://192.168.31.194:58001/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-    with ui.column().classes('items-center'):
-        with ui.label('02').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe2" src="http://192.168.31.194:58002/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-    with ui.column().classes('items-center'):
-        with ui.label('03').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe1" src="http://192.168.31.194:58003/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-with ui.row().classes('w-full justify-center gap-4'):
-    with ui.column().classes('items-center'):
-        with ui.label('04').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe4" src="http://192.168.31.194:58004/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-    with ui.column().classes('items-center'):
-        with ui.label('05').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe5" src="http://192.168.31.194:58005/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-    with ui.column().classes('items-center'):
-        with ui.label('06').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe6" src="http://192.168.31.194:58006/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-with ui.row().classes('w-full justify-center gap-4'):
-    with ui.column().classes('items-center'):
-        with ui.label('07').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe7" src="http://192.168.31.194:58007/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-    with ui.column().classes('items-center'):
-        with ui.label('08').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe8" src="http://192.168.31.194:58008/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-    with ui.column().classes('items-center'):
-        with ui.label('09').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe9" src="http://192.168.31.194:58009/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-with ui.row().classes('w-full justify-center gap-4'):
-    with ui.column().classes('items-center'):
-        with ui.label('10').classes('text-2xl font-bold'): pass
-        with ui.card().style('width: 630px; height: 700px;') as card:
-            ui.html('<iframe id="iframe10" src="http://192.168.31.194:58010/" width="200%" height="445%" style="overflow:auto;"></iframe>')
-
-ui.run()

+ 0 - 116
demo/web3_demo.py

@@ -1,116 +0,0 @@
-# -*- coding: utf-8 -*-
-from web3 import Web3, HTTPProvider
-
-# 连接到以太坊节点
-w3 = Web3(HTTPProvider('http://127.0.0.1:8545'))
-
-# 检查是否连接成功
-if w3.isConnected():
-    print("Connected to Ethereum node")
-else:
-    print("Failed to connect to Ethereum node")
-    exit()
-
-# 1. 获取最新区块号
-latest_block = w3.eth.block_number
-print(f"Latest block number: {latest_block}")
-
-# 2. 获取区块信息
-block = w3.eth.get_block(latest_block)
-print(f"Block info: {block}")
-
-# 3. 获取账户余额
-account = '0xYourAccountAddress'  # 替换为你的账户地址
-balance = w3.eth.get_balance(account)
-print(f"Balance of {account}: {w3.fromWei(balance, 'ether')} ETH")
-
-# 4. 发送交易
-sender = '0xYourAccountAddress'  # 替换为你的账户地址
-private_key = 'YourPrivateKey'  # 替换为你的私钥
-receiver = '0xReceiverAddress'  # 替换为接收方地址
-
-nonce = w3.eth.get_transaction_count(sender)
-tx = {
-    'nonce': nonce,
-    'to': receiver,
-    'value': w3.toWei(0.01, 'ether'),
-    'gas': 2000000,
-    'gasPrice': w3.toWei('50', 'gwei'),
-}
-signed_tx = w3.eth.account.sign_transaction(tx, private_key)
-tx_hash = w3.eth.send_raw_transaction(signed_tx.rawTransaction)
-print(f"Transaction hash: {w3.toHex(tx_hash)}")
-
-# 5. 与智能合约交互
-contract_address = '0xYourContractAddress'  # 替换为合约地址
-contract_abi = [...]  # 替换为合约的ABI
-contract = w3.eth.contract(address=contract_address, abi=contract_abi)
-
-# 调用合约的只读方法
-result = contract.functions.yourReadOnlyMethod().call()
-print(f"Result from contract: {result}")
-
-# 调用合约的写方法
-tx = contract.functions.yourWriteMethod(param1, param2).buildTransaction({
-    'nonce': w3.eth.get_transaction_count(sender),
-    'gas': 2000000,
-    'gasPrice': w3.toWei('50', 'gwei'),
-})
-signed_tx = w3.eth.account.sign_transaction(tx, private_key)
-tx_hash = w3.eth.send_raw_transaction(signed_tx.rawTransaction)
-print(f"Transaction hash: {w3.toHex(tx_hash)}")
-
-# 6. 监听事件
-event_filter = contract.events.YourEvent.createFilter(fromBlock='latest')
-print("Listening for events...")
-while True:
-    for event in event_filter.get_new_entries():
-        print(f"New event: {event}")
-
-# 7. 获取交易收据
-tx_receipt = w3.eth.get_transaction_receipt(tx_hash)
-print(f"Transaction receipt: {tx_receipt}")
-
-# 8. 获取交易详情
-tx_detail = w3.eth.get_transaction(tx_hash)
-print(f"Transaction detail: {tx_detail}")
-
-# 9. 获取日志
-logs = w3.eth.get_logs({
-    'fromBlock': 0,
-    'toBlock': 'latest',
-    'address': contract_address,
-})
-print(f"Logs: {logs}")
-
-# 10. 获取当前 Gas 价格
-gas_price = w3.eth.gas_price
-print(f"Current gas price: {w3.fromWei(gas_price, 'gwei')} gwei")
-
-# 11. 获取账户交易数量
-transaction_count = w3.eth.get_transaction_count(sender)
-print(f"Transaction count: {transaction_count}")
-
-# 12. 获取合约代码
-contract_code = w3.eth.get_code(contract_address)
-print(f"Contract code: {contract_code}")
-
-# 13. 获取账户存储
-storage = w3.eth.get_storage_at(contract_address, 0)
-print(f"Storage at position 0: {storage}")
-
-# 14. 获取账户 nonce
-nonce = w3.eth.get_transaction_count(sender)
-print(f"Account nonce: {nonce}")
-
-# 15. 获取区块 gas 限制
-gas_limit = w3.eth.get_block('latest')['gasLimit']
-print(f"Gas limit: {gas_limit}")
-
-# 16. 获取区块 gas 使用量
-gas_used = w3.eth.get_block('latest')['gasUsed']
-print(f"Gas used: {gas_used}")
-
-# 17. 获取区块 gas 费用
-gas_fee = gas_used * gas_price
-print(f"Gas fee: {w3.fromWei(gas_fee, 'ether')} ETH")

+ 0 - 132
monad/faucet_official.py

@@ -1,132 +0,0 @@
-# -*- coding: utf-8 -*-
-import asyncio
-from loguru import logger
-import random
-import hashlib
-from eth_account import Account
-from pynocaptcha import CloudFlareCracker, TlsV1Cracker
-from curl_cffi.requests import AsyncSession
-
-SETTINGS = {
-    "ATTEMPTS": 3,
-    "RANDOM_PAUSE_BETWEEN_ACTIONS": [1, 5],
-}
-
-FAUCET = {
-    "USE_CAPSOLVER_FOR_CLOUDFLARE": False,
-    "CAPSOLVER_API_KEY": "your_capsolver_api_key",
-    "NOCAPTCHA_API_KEY": "your_nocaptcha_api_key",
-}
-
-
-async def faucet(
-        session: AsyncSession,
-        account_index: int,
-        wallet: Account,
-        proxy: str,
-) -> bool:
-    for retry in range(SETTINGS["ATTEMPTS"]):
-        try:
-            logger.info(f"[{account_index}] | Starting faucet for account {wallet.address}...")
-            user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
-            href = "https://testnet.monad.xyz/"
-
-            # Solve Cloudflare challenge
-            if FAUCET["USE_CAPSOLVER_FOR_CLOUDFLARE"]:
-                logger.info(f"[{account_index}] | Solving Cloudflare challenge with Capsolver...")
-                # 这里假设Capsolver类已经定义并且可用
-                capsolver = Capsolver(api_key=FAUCET["CAPSOLVER_API_KEY"], proxy=proxy, session=session)
-                cf_result = await capsolver.solve_turnstile("0x4AAAAAAA-3X4Nd7hf3mNGx", href)
-            else:
-                logger.info(f"[{account_index}] | Solving Cloudflare challenge with Nocaptcha...")
-                # 这里假设CloudFlareCracker类已经定义并且可用
-                cracker = CloudFlareCracker(
-                    internal_host=True,
-                    user_token=FAUCET["NOCAPTCHA_API_KEY"],
-                    href=href,
-                    sitekey="0x4AAAAAAA-3X4Nd7hf3mNGx",
-                    proxy=proxy,
-                    debug=False,
-                    show_ad=False,
-                    timeout=60,
-                )
-                cf_result = cracker.crack()
-                cf_result = cf_result["token"]
-
-            if not cf_result:
-                raise Exception("Failed to solve Cloudflare challenge")
-
-            logger.success(f"[{account_index}] | Cloudflare challenge solved")
-
-            # Generate visitor ID
-            visitor_id = hashlib.md5(str(random.random()).encode()).hexdigest()
-
-            json_data = {
-                "address": wallet.address,
-                "visitorId": visitor_id,
-                "cloudFlareResponseToken": cf_result,
-            }
-
-            headers = {
-                "sec-ch-ua-platform": '"Windows"',
-                "user-agent": user_agent,
-                "sec-ch-ua": '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
-                "content-type": "application/json",
-                "sec-ch-ua-mobile": "?0",
-                "accept": "*/*",
-                "origin": href,
-                "sec-fetch-site": "same-origin",
-                "sec-fetch-mode": "cors",
-                "sec-fetch-dest": "empty",
-                "referer": href,
-                "accept-language": "en-GB,en;q=0.9",
-                "priority": "u=1, i",
-            }
-
-            response = await session.post(
-                f"{href}api/faucet/claim", headers=headers, json=json_data
-            )
-            response_text = response.text
-
-            if not response_text:
-                raise Exception("Failed to send claim request")
-
-            if '"Success"' in response_text or '"message":"Success"' in response_text:
-                logger.success(f"[{account_index}] | Successfully got tokens from faucet")
-                return True
-
-            if "Claimed already" in response_text:
-                logger.success(f"[{account_index}] | Already claimed tokens from faucet")
-                return True
-
-            error_messages = {
-                "FUNCTION_INVOCATION_TIMEOUT": "Server is not responding, wait...",
-                "Vercel Security Checkpoint": "Failed to solve Vercel challenge, trying again...",
-                "Server error on QuickNode API": "FAUCET DOES NOT WORK, QUICKNODE IS DOWN",
-                "Over Enterprise free quota": "MONAD IS SHIT, FAUCET DOES NOT WORK, TRY LATER",
-                "invalid-keys": "PLEASE UPDATE THE BOT USING GITHUB",
-            }
-
-            for key, message in error_messages.items():
-                if key in response_text:
-                    logger.error(f"[{account_index}] | {message}")
-                    if key == "Over Enterprise free quota" or key == "invalid-keys":
-                        return False
-                    break
-            else:
-                logger.error(f"[{account_index}] | Failed to get tokens from faucet: {response_text}")
-
-            await asyncio.sleep(3)
-
-        except Exception as e:
-            random_pause = random.randint(*SETTINGS["RANDOM_PAUSE_BETWEEN_ACTIONS"])
-            if "operation timed out" in str(e):
-                logger.error(
-                    f"[{account_index}] | Error faucet to monad.xyz ({retry + 1}/{SETTINGS['ATTEMPTS']}): Connection timed out. Next faucet in {random_pause} seconds")
-            else:
-                logger.error(
-                    f"[{account_index}] | Error faucet to monad.xyz ({retry + 1}/{SETTINGS['ATTEMPTS']}): {e}. Next faucet in {random_pause} seconds")
-            await asyncio.sleep(random_pause)
-            continue
-
-    return False

+ 63 - 0
monad/monadscore_query.py

@@ -0,0 +1,63 @@
+from playwright.sync_api import sync_playwright
+import time
+
+def get_wallet_detail(wallet_address: str, page):
+    # 定义输入框和按钮的选择器
+    input_selector = '#root > div > div > div.min-h-screen.overflow-hidden.sm\\:ml-0 > div:nth-child(3) > div > div > div.flex.flex-col.space-y-4 > input'
+    button_selector = '#root > div > div > div.min-h-screen.overflow-hidden.sm\\:ml-0 > div:nth-child(3) > div > div > div.flex.flex-col.space-y-4 > button.px-4.py-2.text-white.font-semibold.rounded-md.bg-purple-600.cursor-pointer.hover\\:bg-purple-700'
+
+    try:
+        # 等待输入框出现并确保其可交互
+        page.wait_for_selector(input_selector, state='visible', timeout=10000)
+        # 清除输入框内容(如果有默认值)
+        page.fill(input_selector, '')
+        # 填入钱包地址
+        page.fill(input_selector, wallet_address)
+
+        # 等待按钮出现并确保其可点击
+        page.wait_for_selector(button_selector, state='visible', timeout=10000)
+        # 点击按钮
+        page.click(button_selector)
+    except Exception as e:
+        print(f"查询钱包 {wallet_address} 时出错: {str(e)}")
+
+def main():
+    with sync_playwright() as p:
+        # 启动一个 Chromium 浏览器,headless=False 确保可见
+        browser = p.chromium.launch(
+            headless=False,
+            args=["--start-maximized"]
+            )
+        
+        wallet_list = [
+            '0xe50B77Cd771243b8Ae1d6ce33b4E13ECC5Fa28a6',
+            '0x9ea2ECAD4090E32916e03b77d7C75CbF6C8E0A55',
+            '0xE8A4b0C04300154DC9B1D0e565Ba70F996614690',
+            '0x1b623c5d70c93b437d93c305bf2cfa389095f636',
+            '0x06D25c3e0E1F753ac0486a3f8aaD7259149656cB',
+            '0x15cFEE34Ca4541CAc9a1c4B6F6aB47A65877E240',
+            '0x7aBF0dA8Ac07B6dE7206e467988455E1AD0b60B5',
+            '0xF736f45d4663a8D8DfF7EFA55b1Cf6Fe38D026c8',
+            '0x83173eECf3a6d9ABB79682568e16c2eAd361620e',
+            '0xa401b85B4849Fc7610Bd180cc937859C78528F47'
+        ]
+
+        context = browser.new_context(no_viewport=True)
+        
+        for i, wallet in enumerate(wallet_list):
+            page = context.new_page()
+            page.goto("https://repute.monadscore.xyz/")
+            print(f"已打开第 {i + 1} 个标签页")
+            time.sleep(1)
+            print(f'正在查询钱包 {i} : {wallet}')
+            get_wallet_detail(wallet, page)
+        try:
+            while True:
+                time.sleep(3600)
+        except KeyboardInterrupt:
+            print("程序被手动终止,关闭浏览器...")
+            context.close()
+            browser.close()
+
+if __name__ == "__main__":
+    main()