diff --git a/中国电信/Ruishu.py b/中国电信/Ruishu.py deleted file mode 100644 index 17cd389..0000000 --- a/中国电信/Ruishu.py +++ /dev/null @@ -1,255 +0,0 @@ -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('