From 1574e826200179eb752430907f268ed5cf84f706 Mon Sep 17 00:00:00 2001
From: timxx <3337598077@qq.com>
Date: Tue, 21 Jul 2026 20:56:40 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?=
=?UTF-8?q?=E3=80=8CTongXun/Telecom=E3=80=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
TongXun/Telecom/Ruishu.py | 255 +++++++++++++
TongXun/Telecom/ruishucookie.py | 205 +++++++++++
TongXun/Telecom/瑞数通杀.js | 139 +++++++
TongXun/Telecom/电信0点抢兑.py | 632 ++++++++++++++++++++++++++++++++
TongXun/Telecom/电信任务.py | 374 +++++++++++++++++++
5 files changed, 1605 insertions(+)
create mode 100644 TongXun/Telecom/Ruishu.py
create mode 100644 TongXun/Telecom/ruishucookie.py
create mode 100644 TongXun/Telecom/瑞数通杀.js
create mode 100644 TongXun/Telecom/电信0点抢兑.py
create mode 100644 TongXun/Telecom/电信任务.py
diff --git a/TongXun/Telecom/Ruishu.py b/TongXun/Telecom/Ruishu.py
new file mode 100644
index 0000000..a7f56f6
--- /dev/null
+++ b/TongXun/Telecom/Ruishu.py
@@ -0,0 +1,255 @@
+import os
+import ssl
+import time
+import json
+import execjs
+import base64
+import random
+import certifi
+import aiohttp
+import asyncio
+import requests
+from http import cookiejar
+from Crypto.Cipher import DES3
+from Crypto.Util.Padding import pad, unpad
+from aiohttp import ClientSession, TCPConnector
+import httpx
+httpx._config.DEFAULT_CIPHERS += ":ALL:@SECLEVEL=1"
+diffValue = 2
+filename='Cache.js'
+if os.path.exists(filename):
+ with open(filename, 'r', encoding='utf-8') as file:
+ fileContent = file.read()
+else:
+ fileContent=''
+
+class BlockAll(cookiejar.CookiePolicy):
+ return_ok = set_ok = domain_return_ok = path_return_ok = lambda self, *args, **kwargs: False
+ netscape = True
+ rfc2965 = hide_cookie2 = False
+
+def printn(m):
+ print(f'\n{m}')
+
+context = ssl.create_default_context()
+context.set_ciphers('DEFAULT@SECLEVEL=1') # 低安全级别0/1
+context.check_hostname = False # 禁用主机
+context.verify_mode = ssl.CERT_NONE # 禁用证书
+
+class DESAdapter(requests.adapters.HTTPAdapter):
+ def init_poolmanager(self, *args, **kwargs):
+ kwargs['ssl_context'] = context
+ return super().init_poolmanager(*args, **kwargs)
+
+requests.DEFAULT_RETRIES = 0
+requests.packages.urllib3.disable_warnings()
+ss = requests.session()
+ss.headers = {"User-Agent": "Mozilla/5.0 (Linux; Android 13; 22081212C Build/TKQ1.220829.002) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.97 Mobile Safari/537.36", "Referer": "https://wapact.189.cn:9001/JinDouMall/JinDouMall_independentDetails.html"}
+ss.mount('https://', DESAdapter())
+ss.cookies.set_policy(BlockAll())
+runTime = 0
+sleepTime = 1
+key = b'1234567`90koiuyhgtfrdews'
+iv = 8 * b'\0'
+
+def encrypt(text):
+ cipher = DES3.new(key, DES3.MODE_CBC, iv)
+ ciphertext = cipher.encrypt(pad(text.encode(), DES3.block_size))
+ return ciphertext.hex()
+
+def decrypt(text):
+ ciphertext = bytes.fromhex(text)
+ cipher = DES3.new(key, DES3.MODE_CBC, iv)
+ plaintext = unpad(cipher.decrypt(ciphertext), DES3.block_size)
+ return plaintext.decode()
+
+def initCookie(getUrl='https://wapact.189.cn:9001/gateway/standQuery/detailNew/exchange'):
+ global js_code_ym, fileContent
+ cookie = ''
+ response = httpx.post(getUrl)
+ content = response.text.split(' content="')[2].split('" r=')[0]
+ code1 = response.text.split('$_ts=window')[1].split('