├── 1.txt ├── ModifiedBase64 ├── README.md ├── api ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── __init__.cpython-39.pyc │ ├── config.cpython-37.pyc │ ├── httpSession.cpython-37.pyc │ ├── httpSession.cpython-39.pyc │ ├── jdtime.cpython-39.pyc │ ├── mobileApi.cpython-37.pyc │ └── mobileApi.cpython-39.pyc ├── httpSession.py ├── jdtime.py └── mobileApi.py ├── config ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── __init__.cpython-39.pyc │ ├── config.cpython-37.pyc │ └── config.cpython-39.pyc └── config.py ├── log ├── api_error_2023-10-18_11-30-29_465384.log ├── api_error_2023-10-18_11-55-45_036397.log ├── api_info_2023-10-18_11-30-29_461831.log ├── api_info_2023-10-18_11-55-45_031396.log ├── main_2023-10-17_12-00-44_682346.log ├── main_2023-10-17_12-01-05_920927.log ├── main_2023-10-17_12-01-26_799772.log ├── main_2023-10-18_11-30-29_650121.log └── main_2023-10-18_11-55-45_208687.log ├── main.py └── sign ├── __init__.py ├── __pycache__ ├── __init__.cpython-37.pyc └── __init__.cpython-39.pyc ├── emu ├── emu.py └── emu2.py ├── libjdbitmapkit.so └── sign ├── ModifiedBase64.py ├── TenMagic16.py ├── TenMagic32.py ├── TenSeattos.py ├── Utils.py ├── __pycache__ ├── TenMagic16.cpython-310.pyc ├── TenMagic16.cpython-37.pyc ├── TenMagic16.cpython-39.pyc ├── TenMagic32.cpython-310.pyc ├── TenMagic32.cpython-37.pyc ├── TenMagic32.cpython-39.pyc ├── TenSeattos.cpython-310.pyc ├── TenSeattos.cpython-37.pyc ├── TenSeattos.cpython-39.pyc ├── Utils.cpython-310.pyc ├── Utils.cpython-37.pyc ├── Utils.cpython-39.pyc ├── __init__.cpython-310.pyc ├── jdSign.cpython-310.pyc ├── jdSign.cpython-37.pyc └── jdSign.cpython-39.pyc ├── jdSign.py └── test.py /1.txt: -------------------------------------------------------------------------------- 1 | TenSeattos 2 | st=1697429193511&sign=f1e7427aa9798d82599b653a6075ae03&sv=120 3 | token========> AAEAIPhy0XwUobXTpdL3WP_t4aQJBAcaF1smlJETsgLAXLnI1 4 | jumpURL======> https://un.m.jd.com/cgi-bin/app/appjmp?tokenKey=AAEAIPhy0XwUobXTpdL3WP_t4aQJBAcaF1smlJETsgLAXLnI1&to=https://divide.jd.com/user_routing?skuId=100012043978&from=app 5 | header1======> {'J-E-C': '%7B%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22ts%22%3A1697342224152%2C%22ridx%22%3A-1%2C%22cipher%22%3A%7B%22pin%22%3A%22ZxV1aQ9l%22%7D%2C%22ciphertype%22%3A5%2C%22version%22%3A%221.2.0%22%2C%22appname%22%3A%22com.jingdong.app.mall%22%7D', 'X-Rp-Client': 'android_3.0.0', 'jdgs': '{"b1":"b16693c8-e5b5-425a-bb08-7f6702f1ca12","b2":"3.2.4_0","b3":"2.1","b4":"svUDpKAumjk08GQzIdg8NfW7WdMCIOKvo2KmeWwPvZa2Nlqi4h1BVMNMk3dqJKP5fjzptB8eqchiZ6mHM1fIeYccbwyaOznPfCKHd59N87guA/rZX5XYyV4VZ0TDeq1IDoUmszyGXVlE0+j5MP+icVJ42Cd8tCQo4GPxJ92zT4TPLipoDnk0AKOwOsBnLxo4LBCkRl2ACXkVtzjGAuVywhKiUlDG6dlZoU3QAO/KUN6Ugwl3rCoxrRw/k0bXkNQLRDCB3JarvPUKfnq92iKeyUSNdfutX0pAFoLOemNFf/yK+cU6VPhVmBuy9bF19Hnv6ovnq0XmbUjdLI+wtGWSmJr/pQxLYmi7hVic8e0jX1r25M8J94rDcSzqU+LagR/+g9H0JfE=","b5":"017279f926ba6881c1a7a85808eb5e581e6be036","b7":"1697342443303","b6":"fe36a8b902f1dbdee8575e6a73263660754e4f06"}', 'Connection': 'keep-alive', 'X-Referer-Package': 'com.jingdong.app.mall', 6 | 'Charset': 'UTF-8', 'X-Referer-Page': 'com.jingdong.app.mall.WebActivity', 'Accept-Encoding': 'br,gzip,deflate', 'Cache-Control': 'no-cache', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Host': 'api.m.jd.com', 'User-Agent': 'okhttp/3.12.16;jdmall;android;version/12.2.0;build/98990;', 'Cookie': 'wskey=AAJlJ5yoAEBRH6fDxEf_i3s1bAgUJ17j1JOGkbDgNGi_bW6xNkKP1xtooyLi_4WUFrFs7BTbo8TF-RsTK0EifHXfA5PefT1n;whwswswws=JD012145b9h9NtHJ2tQ91697342228188011yrBT-9KARq5b1dleVopCFhhpkXIhtXRzJQuUzLQmIgChFfxVjXIJQK_T3MDZfEFacykXdARlFCIruSLvAlwHQ1ekbuzs~AAteofTGLEAAAAAAAAAAAAAAAAFc55mrWz6ElfwAAAAZmdXVob28;unionwsws={"devicefinger":"eidA3e84812360sacXOyFYL7RzSoHKB6uKa4iHFzs4POXUYzjOnVvYofGycBrOdsifIwt1UwAVkAunyz709VQTMOypkJdxy6bvkxcIW0AL\\/SAB56\\/RdZ","jmafinger":"JD012145b9h9NtHJ2tQ91697342228188011yrBT-9KARq5b1dleVopCFhhpkXIhtXRzJQuUzLQmIgChFfxVjXIJQK_T3MDZfEFacykXdARlFCIruSLvAlwHQ1ekbuzs~AAteofTGLEAAAAAAAAAAAAAAAAFc55mrWz6ElfwAAAAZmdXVob28"};pin_hash=-1263152894;'} 7 | header2======> {} 8 | divideUrl========> https://divide.jd.com/user_routing?skuId=100012043978&mid=Gey6unMAu_RrA10ziFZqd19F1ZBDn5R6KLgH_MdbLXg&sid=2707c5c0b9181da3b3dc019ee22f1bew 9 | divideURl=====> https://divide.jd.com/user_routing?skuId=100012043978&mid=Gey6unMAu_RrA10ziFZqd19F1ZBDn5R6KLgH_MdbLXg&sid=2707c5c0b9181da3b3dc019ee22f1bew 10 | captchaUrl========> https://marathon.jd.com/m/captcha.html?sid=2707c5c0b9181da3b3dc019ee22f1bew&skuId=100012043978&mid=Gey6unMAu_RrA10ziFZqd19F1ZBDn5R6KLgH_MdbLXg 11 | skillUrl========> https://marathon.jd.com/seckillM/seckill.action?skuId=100012043978&num=1&rid=1697429194&deliveryMode= 12 | 获取抢购链接成功,链接地址:https://marathon.jd.com/seckillM/seckill.action?skuId=100012043978&num=1&rid=1697429194&deliveryMode= 13 | skillUrl https://marathon.jd.com/seckillM/seckill.action?skuId=100012043978&num=1&rid=1697429194&deliveryMode= -------------------------------------------------------------------------------- /ModifiedBase64: -------------------------------------------------------------------------------- 1 | from ast import Str 2 | from json.tool import main 3 | 4 | 5 | class ModifiedBase64: 6 | def __init__(self) -> None: 7 | pass 8 | self.emptyBytes = bytearray().zfill(128) 9 | self.staticArray = ('K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/') 10 | self.initEmptyBytes() 11 | def initEmptyBytes(self): 12 | i=0 13 | ii=0 14 | while True: 15 | l=len( self.emptyBytes) 16 | if ii> (((2 - (i4 + 1)) * 2) + 2)) 51 | aa=a | b 52 | bArr2[i4]=aa 53 | i3=i3+1 54 | i7=0 55 | while i7<=i3-1: 56 | mybyteArray.append(bArr2[i7]) 57 | i7=i7+1 58 | return mybyteArray 59 | 60 | def encrypt(self,bt:bytes): 61 | sb = "" 62 | print(bt) 63 | for i in range(0,len(bt),3): 64 | bArr2 = bytearray().zfill(4) 65 | b = 0; 66 | for i2 in range(0,3): 67 | i3 = i + i2; 68 | if i3 <= len(bt)-1: 69 | bArr2[i2] = (b | ((bt[i3] & 255) >> ((i2 * 2) + 2))); 70 | b = ((((bt[i3] & 255) << (((2 - i2) * 2) + 2)) & 255) >> 2); 71 | else: 72 | bArr2[i2] = b; 73 | b = 0x40; 74 | 75 | bArr2[3] = b; 76 | for i4 in range(0,4): 77 | right=(63+255)%255 78 | if (bArr2[i4] <= right): 79 | sb=sb+self.staticArray[bArr2[i4]] 80 | else: 81 | sb=sb+'='; 82 | return sb 83 | 84 | 85 | def main(): 86 | modifiedBase64= ModifiedBase64(); 87 | 88 | strIn = "你的uuid base64"; 89 | print(strIn) 90 | uuidByte=modifiedBase64.decrypt(strIn) 91 | uuidStr=str(uuidByte,"utf8") 92 | print(uuidStr) 93 | ss=modifiedBase64.encrypt(uuidByte) 94 | print(ss) 95 | 96 | 97 | if __name__ == '__main__': 98 | main() 99 | 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mtforjd 2 | 自己搞的京东强=抢茅台,反正没抢到 3 | 4 | 5 | ##手机抓包 替换Config里面的信息为自己的 6 | 7 | 解码库使用的其他一个项目的,具体地址忘了,你们可以搜一下 8 | 9 | 代码不完善,使用的话需要你们再整整 10 | 11 | 12 | 上传uuid解码类。解决抓包后怎么从类似于base64的字符串拿到真实的uuid,这个也是百度整理的,应该是一种base64的解码变种 13 | -------------------------------------------------------------------------------- /api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__init__.py -------------------------------------------------------------------------------- /api/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /api/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /api/__pycache__/config.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/config.cpython-37.pyc -------------------------------------------------------------------------------- /api/__pycache__/httpSession.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/httpSession.cpython-37.pyc -------------------------------------------------------------------------------- /api/__pycache__/httpSession.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/httpSession.cpython-39.pyc -------------------------------------------------------------------------------- /api/__pycache__/jdtime.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/jdtime.cpython-39.pyc -------------------------------------------------------------------------------- /api/__pycache__/mobileApi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/mobileApi.cpython-37.pyc -------------------------------------------------------------------------------- /api/__pycache__/mobileApi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/api/__pycache__/mobileApi.cpython-39.pyc -------------------------------------------------------------------------------- /api/httpSession.py: -------------------------------------------------------------------------------- 1 | 2 | import re 3 | from config.config import myconfig as config 4 | import requests 5 | class session(): 6 | def __init__(self) -> None: 7 | self.session=self._init_session() 8 | self.setOriginHeader() 9 | self.setAgent() 10 | self.setCookies() 11 | 12 | 13 | def _init_session(self): 14 | session = requests.session() 15 | 16 | return session 17 | 18 | def getOriginHeader(self): 19 | return { 20 | 'J-E-C': '%7B%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22ts%22%3A1697342224152%2C%22ridx%22%3A-1%2C%22cipher%22%3A%7B%22pin%22%3A%22ZxV1aQ9l%22%7D%2C%22ciphertype%22%3A5%2C%22version%22%3A%221.2.0%22%2C%22appname%22%3A%22com.jingdong.app.mall%22%7D', 21 | 'X-Rp-Client': 'android_3.0.0', 22 | 'jdgs': '{"b1":"b16693c8-e5b5-425a-bb08-7f6702f1ca12","b2":"3.2.4_0","b3":"2.1","b4":"svUDpKAumjk08GQzIdg8NfW7WdMCIOKvo2KmeWwPvZa2Nlqi4h1BVMNMk3dqJKP5fjzptB8eqchiZ6mHM1fIeYccbwyaOznPfCKHd59N87guA/rZX5XYyV4VZ0TDeq1IDoUmszyGXVlE0+j5MP+icVJ42Cd8tCQo4GPxJ92zT4TPLipoDnk0AKOwOsBnLxo4LBCkRl2ACXkVtzjGAuVywhKiUlDG6dlZoU3QAO/KUN6Ugwl3rCoxrRw/k0bXkNQLRDCB3JarvPUKfnq92iKeyUSNdfutX0pAFoLOemNFf/yK+cU6VPhVmBuy9bF19Hnv6ovnq0XmbUjdLI+wtGWSmJr/pQxLYmi7hVic8e0jX1r25M8J94rDcSzqU+LagR/+g9H0JfE=","b5":"017279f926ba6881c1a7a85808eb5e581e6be036","b7":"1697342443303","b6":"fe36a8b902f1dbdee8575e6a73263660754e4f06"}', 23 | 'Connection': 'keep-alive', 24 | 'X-Referer-Package': 'com.jingdong.app.mall', 25 | 'Charset': 'UTF-8', 26 | 'X-Referer-Page': 'com.jingdong.app.mall.WebActivity', 27 | 'Accept-Encoding': 'br,gzip,deflate', 28 | 'Cache-Control': 'no-cache', 29 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 30 | 'Host': 'api.m.jd.com' 31 | } 32 | def getAgentHeader(self): 33 | return {"User-Agent": config.get("agent")} 34 | def getCookieHeader(self): 35 | return {"Cookie": config.get("cookie")} 36 | 37 | 38 | 39 | def setOriginHeader(self): 40 | self.session.headers=self.getOriginHeader() 41 | def setAgent(self): 42 | self.session.headers.update(self.getAgentHeader()) 43 | def setCookies(self): 44 | self.session.headers.update(self.getCookieHeader()) 45 | -------------------------------------------------------------------------------- /api/jdtime.py: -------------------------------------------------------------------------------- 1 | import time 2 | from datetime import datetime, timedelta 3 | import requests 4 | def jd_time(): 5 | """ 6 | 从京东服务器获取时间戳 7 | """ 8 | url = 'https://api.m.jd.com' 9 | resp = requests.get(url, verify=False) 10 | jd_timestamp = int(resp.headers.get('X-API-Request-Id')[-13:]) 11 | print("jd_timestamp",jd_timestamp) 12 | return jd_timestamp 13 | 14 | def local_time(): 15 | """ 16 | 获取本地时间戳 17 | """ 18 | local_timestamp = round(time.time() * 1000) 19 | print("local_timestamp",local_timestamp) 20 | 21 | return local_timestamp 22 | 23 | def local_jd_time_diff(): 24 | """ 25 | 计算本地与京东服务器时间差 26 | """ 27 | return local_time() - jd_time() 28 | 29 | # ttt=local_jd_time_diff() 30 | # print(ttt) 31 | -------------------------------------------------------------------------------- /api/mobileApi.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | from distutils.log import log 4 | import json 5 | from json.tool import main 6 | from logging import Logger 7 | import re 8 | from api.httpSession import session 9 | from config.config import myconfig as config 10 | import time 11 | from urllib.parse import urlencode 12 | from sign.sign.jdSign import getSignWithstv 13 | from loguru import logger 14 | 15 | logger.add('./log/api_info_{time}.log', rotation="50 MB",encoding='utf-8') 16 | logger.add('./log/api_error_{time}.log', rotation="50 MB",encoding='utf-8',filter=lambda record: "ERROR" in record['level'].name) 17 | 18 | 19 | class JDAPi(): 20 | def __init__(self) -> None: 21 | self.session_obj=session().session 22 | self.appVersion=config.get("appVersion") 23 | self.eid=config.get("eid") 24 | self.M_JD_URL="https://api.m.jd.com/client.action?" 25 | self.uuid=config.get("uuid") 26 | def _getTokenEP(self): 27 | t = time.time() 28 | st = str(int(round(t * 1000)-330)) 29 | return {"hdid":"JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw=","ts":st,"ridx":-1,"cipher":{"area":"CJDpCJOnCv80DtY2DV80DtY5EK==","d_model":"UwVubWvBCtLGcw8=","wifiBssid":"YJuzDwTrDWPvZJCyCQG4YJGmCtKzC2Y3DwO5CwTuZNG=","osVersion":"CJO=","d_brand":"WQvrb21f","screen":"CtS5DsenCNqm","uuid":"DJczEWU2DwPuDwDwYJOyDG==","aid":"DJczEWU2DwPuDwDwYJOyDG==","openudid":"DJczEWU2DwPuDwDwYJOyDG=="},"ciphertype":5,"version":"1.2.0","appname":"com.jingdong.app.mall"} 30 | 31 | def _getTokenQuery(self): 32 | ep=self._getTokenEP() 33 | QueryString = { 34 | "functionId" : "genToken", 35 | "clientVersion" : self.appVersion, 36 | "build":98990, 37 | "client" : "android", 38 | "eid" : self.eid, 39 | "ef" : "1", 40 | "ep" :ep 41 | } 42 | return QueryString 43 | def _getIsAppointQuery(self): 44 | ep=self._getTokenEP() 45 | QueryString = { 46 | "functionId" : "isAppoint", 47 | "clientVersion" : self.appVersion, 48 | "build":98990, 49 | "client" : "android", 50 | "eid" : self.eid, 51 | "ef" : "1", 52 | "ep" :ep 53 | } 54 | return QueryString 55 | 56 | def _getAppointQuery(self): 57 | ep=self._getTokenEP() 58 | QueryString = { 59 | "functionId" : "appoint", 60 | "clientVersion" : self.appVersion, 61 | "build":98990, 62 | "client" : "android", 63 | "eid" : self.eid, 64 | "ef" : "1", 65 | "ep" :ep 66 | } 67 | return QueryString 68 | def _getTokenBody(self): 69 | return {"body" : '{"action":"to","to":"https%3A%2F%2Fdivide.jd.com%2Fuser_routing%3FskuId%3D100012043978%26from%3Dapp"}'} 70 | def _getIsAppointBody(self): 71 | return {"body":'{"isShowCode":"0","skuId":"100012043978","sr":"1"}'} 72 | def _getAppointBody(self): 73 | return {"body":'{"autoAddCart":"0","bsid":"","check":"0","ctext":"","isShowCode":"0","mad":"0","skuId":"100012043978","type":"1"}'} 74 | def _parseTokenUrl(self,inData : dict, body:dict): 75 | return self.M_JD_URL + urlencode(inData) + "&" + getSignWithstv(inData["functionId"], body["body"], self.uuid, inData["client"], inData["clientVersion"]) 76 | def getToken(self): 77 | inData=self._getTokenQuery() 78 | body= self._getTokenBody() 79 | url=self._parseTokenUrl(inData,body) 80 | body=self._getTokenBody() 81 | r = self.session_obj.post(url, data = body) 82 | if r.status_code==200: 83 | text=r.text 84 | result=json.loads(text) 85 | logger.info(f"getTokenResult{result}") 86 | return result["url"],result["tokenKey"] 87 | else: 88 | return None,None 89 | def getdivideUrlbyUNJump(self,jumpUrl,tokenkey): 90 | toUrl="https%3A%2F%2Fdivide.jd.com%2Fuser_routing%3FskuId%3D100012043978%26from%3Dapp" 91 | jumpURL=f"{jumpUrl}?tokenKey={tokenkey}&to={toUrl}" 92 | self.session_obj.headers.clear() 93 | logger.info(f"do=jumpUrl====>{jumpURL}") 94 | appjump = self.session_obj.get(url=jumpURL,allow_redirects=False) 95 | if appjump.status_code==302: 96 | locationUrl=appjump.headers["Location"] 97 | logger.info(f"get=divideUrl====>{locationUrl}") 98 | return locationUrl 99 | else: 100 | logger.error(f"获取divideUrl出错:{appjump.text}") 101 | return None 102 | def getCaptchaUrlbyDivide(self,divideURl): 103 | logger.info(f"do=divideUrl====>{divideURl}") 104 | 105 | captchaResult=self.session_obj.get(divideURl,allow_redirects=False) 106 | if captchaResult.status_code==302: 107 | locationUrl=captchaResult.headers["Location"] 108 | logger.info(f"get=captchaUrl====>{locationUrl}") 109 | return locationUrl 110 | else: 111 | logger.error(f"获取captchaUrl出错:{captchaResult.text}") 112 | return None 113 | def getSkillActionUrlbyCaptcha(self,catpchaUrl): 114 | logger.info(f"do=captchaUrl====>{catpchaUrl}") 115 | 116 | skillReslut=self.session_obj.get(catpchaUrl,allow_redirects=False) 117 | if skillReslut.status_code==302: 118 | skillUrl = skillReslut.headers["Location"] 119 | logger.info(f"get=skillUrl====>{skillUrl}") 120 | return skillUrl 121 | else: 122 | logger.error(f"获取skillUrl出错:{skillReslut.text}") 123 | return None 124 | #提交订单,不用处理 125 | def doSkillAction(self,skillUrl): 126 | logger.info("do=skillUrl=====>",skillUrl) 127 | actionResult=self.session_obj.get(skillUrl,allow_redirects=False) 128 | logger.info(actionResult.status_code) 129 | logger.info(actionResult.text) 130 | 131 | def doOrderSumit(self): 132 | orderUrl="https://marathon.jd.com/seckillnew/orderService/submitOrder.action?skuId=100012043978" 133 | payload='num%3D1%26addressId%3D1419077721%26name%3D%E4%BB%98%E6%B4%AA%E5%BD%AC%26provinceId%3D13%26provinceName%3D%E5%B1%B1%E4%B8%9C%26cityId%3D1112%26cityName%3D%E6%B3%B0%E5%AE%89%E5%B8%82%26countyId%3D46665%26countyName%3D%E5%B2%B1%E5%B2%B3%E5%8C%BA%26townId%3D46698%26townName%3D%E5%8C%97%E9%9B%86%E5%9D%A1%E8%A1%97%E9%81%93%26addressDetail%3D%E9%95%BF%E5%9F%8E%E8%B7%AF%E5%98%89%E5%92%8C%E6%96%B0%E5%9F%8E%E4%BA%8C%E6%9C%9FA6-3-302%26mobile%3D155****3751%26mobileKey%3D0df68e829a3bd20c8c95768965acc88b%26email%3D%26invoiceTitle%3D4%26invoiceContent%3D1%26invoiceTaxpayerNO%3D%26invoicePhone%3D155****3751%26invoicePhoneKey%3D0df68e829a3bd20c8c95768965acc88b%26invoice%3Dtrue%26password%3D%26codTimeType%3D3%26paymentType%3D4%26overseas%3D0%26phone%3D%26areaCode%3D86%26token%3D53a0abb5148aea25e7b8da23b3791514%26skuId%3D100012043978%26eid%3Djdd03E6QGGS3M6CMP3QLLK4CMMI5D42RFEYRWN4BSV2YZMAWX5HQLNIYYLSSCIL54VNC76LC6D4CVVXNLOWYX5T7HDVBGNYAAAAMLDTSEOKAAAAAACR5JCEBZRSHNPUX' 134 | logger.info("finalHeader======>",self.session_obj.headers) 135 | orderRersilt=self.session_obj.post(orderUrl,data=payload) 136 | # logger.info(orderRersilt.text) 137 | if orderRersilt.status_code==200: 138 | try: 139 | result= json.loads(orderRersilt.text) 140 | return result 141 | except Exception as e: 142 | logger.error(f"发起订单错误:{orderRersilt.text}") 143 | return None 144 | else: 145 | return None 146 | 147 | def isAppoint(self): 148 | inData=self._getIsAppointQuery() 149 | body=self._getIsAppointBody() 150 | url=self._parseTokenUrl(inData,body) 151 | r = self.session_obj.post(url, data = body) 152 | if r.status_code==200: 153 | text=r.text 154 | result=json.loads(text) 155 | logger.info(result) 156 | return result.get("isAppoint") 157 | else: 158 | logger.error("查询预约状态失败") 159 | return False 160 | 161 | def doAppoint(self): 162 | inData=self._getAppointQuery() 163 | body=self._getAppointBody() 164 | url=self._parseTokenUrl(inData,body) 165 | r = self.session_obj.post(url, data = body) 166 | if r.status_code==200: 167 | text=r.text 168 | result=json.loads(text) 169 | return result 170 | else: 171 | logger.error("预约失败") 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/config/__init__.py -------------------------------------------------------------------------------- /config/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/config/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /config/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/config/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /config/__pycache__/config.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/config/__pycache__/config.cpython-37.pyc -------------------------------------------------------------------------------- /config/__pycache__/config.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/config/__pycache__/config.cpython-39.pyc -------------------------------------------------------------------------------- /config/config.py: -------------------------------------------------------------------------------- 1 | myconfig = { 2 | "uuid": "125", 3 | "eid": "eidZ", 4 | "cookie": 'wskey=AAJlhpkXIhtXRzJQuUzLQmIgChFfxVjXIJQK_T3MDZfEFacykXdARlFCIruSLvAlwHQ1ekbuzs~AAteofTGLEAAAAAAAAAAAAAAAAFc55mrWz6ElfwAAAAZmdXVob28;unionwsws={"devicefinger":"eidA3e84812360sacXOyFYL7RzSoHKB6uKa4iHFzs4POXUYzjOnVvYofGycBrOdsifIwt1UwAVkAunyz709VQTMOypkJdxy6bvkxcIW0AL\\/SAB56\\/RdZ","jmafinger":"JD012145b9h9NtHJ2tQ91697342228188011yrBT-9KARq5b1dleVopCFhhpkXIhtXRzJQuUzLQmIgChFfxVjXIJQK_T3MDZfEFacykXdARlFCIruSLvAlwHQ1ekbuzs~AAteofTGLEAAAAAAAAAAAAAAAAFc55mrWz6ElfwAAAAZmdXVob28"};pin_hash=-1263152894;', 5 | "agent":"okhttp/3.12.16;jdmall;android;version/12.2.0;build/98990;", 6 | "appVersion":"12.2.0" 7 | } 8 | -------------------------------------------------------------------------------- /log/main_2023-10-17_12-00-44_682346.log: -------------------------------------------------------------------------------- 1 | 2023-10-17 12:00:44.685 | INFO | __main__::99 - 程序启动完成 2 | 2023-10-17 12:00:44.776 | INFO | __main__::102 - 预约任务创建完成 3 | 2023-10-17 12:00:44.778 | INFO | __main__::104 - 抢购任务创建完成 4 | -------------------------------------------------------------------------------- /log/main_2023-10-17_12-01-05_920927.log: -------------------------------------------------------------------------------- 1 | 2023-10-17 12:01:05.923 | INFO | __main__::99 - 程序启动完成 2 | 2023-10-17 12:01:06.018 | INFO | __main__::102 - 预约任务创建完成 3 | 2023-10-17 12:01:06.020 | INFO | __main__::104 - 抢购任务创建完成 4 | 2023-10-17 12:01:07.166 | INFO | __main__:loopSkill:41 - 当前时间:2023-10-17 12:01:06.935000 5 | 2023-10-17 12:01:07.167 | INFO | __main__:loopSkill:48 - 当前时间,开始抢购... 6 | 2023-10-17 12:01:07.274 | INFO | api.mobileApi:getToken:85 - getTokenResult{'code': '0', 'tokenKey': 'AAEAIETBoWh0mjV9TYhjHnZtxXD3fa5v6oTCYg_sV9644Jz11', 'url': 'https://un.m.jd.com/cgi-bin/app/appjmp'} 7 | 2023-10-17 12:01:07.276 | INFO | api.mobileApi:getdivideUrlbyUNJump:93 - do=jumpUrl====>https://un.m.jd.com/cgi-bin/app/appjmp?tokenKey=AAEAIETBoWh0mjV9TYhjHnZtxXD3fa5v6oTCYg_sV9644Jz11&to=https%3A%2F%2Fdivide.jd.com%2Fuser_routing%3FskuId%3D100012043978%26from%3Dapp 8 | 2023-10-17 12:01:07.379 | INFO | api.mobileApi:getdivideUrlbyUNJump:97 - get=divideUrl====>https://divide.jd.com/user_routing?skuId=100012043978&from=app&mid=DcH3p6zBx2_gWpePyN0rFQ1LvTeSGtpR1dpXWtD4juw&sid=253050b61fe21484530a60561a1efb6w 9 | 2023-10-17 12:01:07.381 | INFO | api.mobileApi:getCaptchaUrlbyDivide:103 - do=divideUrl====>https://divide.jd.com/user_routing?skuId=100012043978&from=app&mid=DcH3p6zBx2_gWpePyN0rFQ1LvTeSGtpR1dpXWtD4juw&sid=253050b61fe21484530a60561a1efb6w 10 | 2023-10-17 12:01:07.481 | INFO | api.mobileApi:getCaptchaUrlbyDivide:108 - get=captchaUrl====>https://marathon.jd.com/m/captcha.html?sid=253050b61fe21484530a60561a1efb6w&from=app&skuId=100012043978&mid=DcH3p6zBx2_gWpePyN0rFQ1LvTeSGtpR1dpXWtD4juw 11 | 2023-10-17 12:01:07.483 | INFO | api.mobileApi:getSkillActionUrlbyCaptcha:114 - do=captchaUrl====>https://marathon.jd.com/m/captcha.html?sid=253050b61fe21484530a60561a1efb6w&from=app&skuId=100012043978&mid=DcH3p6zBx2_gWpePyN0rFQ1LvTeSGtpR1dpXWtD4juw 12 | 2023-10-17 12:01:07.592 | INFO | api.mobileApi:getSkillActionUrlbyCaptcha:119 - get=skillUrl====>https://marathon.jd.com/seckillM/seckill.action?skuId=100012043978&num=1&rid=1697515268&deliveryMode= 13 | 2023-10-17 12:01:07.594 | INFO | __main__:loopSkill:63 - 获取抢购链接成功,链接地址:https://marathon.jd.com/seckillM/seckill.action?skuId=100012043978&num=1&rid=1697515268&deliveryMode= 14 | 2023-10-17 12:01:07.595 | INFO | api.mobileApi:doSkillAction:126 - do=skillUrl=====> 15 | 2023-10-17 12:01:07.684 | INFO | api.mobileApi:doSkillAction:128 - 200 16 | 2023-10-17 12:01:07.685 | INFO | api.mobileApi:doSkillAction:129 - 17 | 18 | 19 | 20 | 21 | 填写订单 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 71 | 72 | 80 | 89 | 90 | 95 | 100 | 101 | 108 | 109 | 110 | 111 | 112 |
113 |
123 |
加载中...
124 |
125 |
126 | 127 | 128 | 129 | 132 | 133 | 134 | 135 | 2023-10-17 12:01:07.698 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 136 | 2023-10-17 12:01:07.797 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90016,"skuId":0,"success":false} 137 | 2023-10-17 12:01:07.799 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False} 138 | 2023-10-17 12:01:07.911 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 139 | 2023-10-17 12:01:08.001 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 140 | 2023-10-17 12:01:08.003 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 141 | 2023-10-17 12:01:08.111 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 142 | 2023-10-17 12:01:08.195 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 143 | 2023-10-17 12:01:08.197 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 144 | 2023-10-17 12:01:08.299 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 145 | 2023-10-17 12:01:08.391 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 146 | 2023-10-17 12:01:08.392 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 147 | 2023-10-17 12:01:08.507 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 148 | 2023-10-17 12:01:08.606 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 149 | 2023-10-17 12:01:08.608 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 150 | 2023-10-17 12:01:08.720 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 151 | 2023-10-17 12:01:08.807 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 152 | 2023-10-17 12:01:08.809 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 153 | 2023-10-17 12:01:08.924 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 154 | 2023-10-17 12:01:09.011 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 155 | 2023-10-17 12:01:09.013 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 156 | 2023-10-17 12:01:09.115 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 157 | 2023-10-17 12:01:09.199 | INFO | api.mobileApi:doOrderSumit:136 - 158 | 159 | 160 | 抢购失败 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 |
236 |
237 | 238 | 239 | 240 | 241 |
242 |
243 | 244 | 245 | 318 | 319 | 320 | 2023-10-17 12:01:09.210 | ERROR | api.mobileApi:doOrderSumit:142 - 发起订单错误: 321 | 322 | 323 | 抢购失败 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 |
399 |
400 | 401 | 402 | 403 | 404 |
405 |
406 | 407 | 408 | 481 | 482 | 483 | 2023-10-17 12:01:09.225 | INFO | __main__:loopSkill:74 - None 484 | 2023-10-17 12:01:09.227 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 485 | 2023-10-17 12:01:09.314 | INFO | api.mobileApi:doOrderSumit:136 - 486 | 487 | 488 | 抢购失败 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 |
564 |
565 | 566 | 567 | 568 | 569 |
570 |
571 | 572 | 573 | 646 | 647 | 648 | 2023-10-17 12:01:09.325 | ERROR | api.mobileApi:doOrderSumit:142 - 发起订单错误: 649 | 650 | 651 | 抢购失败 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 |
727 |
728 | 729 | 730 | 731 | 732 |
733 |
734 | 735 | 736 | 809 | 810 | 811 | 2023-10-17 12:01:09.338 | INFO | __main__:loopSkill:74 - None 812 | 2023-10-17 12:01:09.339 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 813 | 2023-10-17 12:01:09.415 | INFO | api.mobileApi:doOrderSumit:136 - 814 | 815 | 816 | 抢购失败 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 |
892 |
893 | 894 | 895 | 896 | 897 |
898 |
899 | 900 | 901 | 974 | 975 | 976 | 2023-10-17 12:01:09.427 | ERROR | api.mobileApi:doOrderSumit:142 - 发起订单错误: 977 | 978 | 979 | 抢购失败 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 |
1055 |
1056 | 1057 | 1058 | 1059 | 1060 |
1061 |
1062 | 1063 | 1064 | 1137 | 1138 | 1139 | 2023-10-17 12:01:09.439 | INFO | __main__:loopSkill:74 - None 1140 | 2023-10-17 12:01:09.441 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1141 | 2023-10-17 12:01:09.530 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1142 | 2023-10-17 12:01:09.532 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1143 | 2023-10-17 12:01:09.648 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1144 | 2023-10-17 12:01:09.754 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1145 | 2023-10-17 12:01:09.755 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1146 | 2023-10-17 12:01:09.866 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1147 | 2023-10-17 12:01:09.959 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1148 | 2023-10-17 12:01:09.960 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1149 | 2023-10-17 12:01:10.069 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1150 | 2023-10-17 12:01:10.155 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90016,"skuId":0,"success":false} 1151 | 2023-10-17 12:01:10.157 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False} 1152 | 2023-10-17 12:01:10.259 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1153 | 2023-10-17 12:01:10.350 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1154 | 2023-10-17 12:01:10.352 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1155 | 2023-10-17 12:01:10.464 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1156 | 2023-10-17 12:01:10.562 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1157 | 2023-10-17 12:01:10.564 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1158 | 2023-10-17 12:01:10.667 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1159 | 2023-10-17 12:01:10.760 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1160 | 2023-10-17 12:01:10.762 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1161 | 2023-10-17 12:01:10.871 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1162 | 2023-10-17 12:01:10.965 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1163 | 2023-10-17 12:01:10.967 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1164 | 2023-10-17 12:01:11.072 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1165 | 2023-10-17 12:01:11.159 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90016,"skuId":0,"success":false} 1166 | 2023-10-17 12:01:11.161 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False} 1167 | 2023-10-17 12:01:11.272 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1168 | 2023-10-17 12:01:11.366 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1169 | 2023-10-17 12:01:11.368 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1170 | 2023-10-17 12:01:11.475 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1171 | 2023-10-17 12:01:11.568 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1172 | 2023-10-17 12:01:11.569 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1173 | 2023-10-17 12:01:11.682 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1174 | 2023-10-17 12:01:11.762 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1175 | 2023-10-17 12:01:11.763 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1176 | 2023-10-17 12:01:11.868 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1177 | 2023-10-17 12:01:11.949 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90016,"skuId":0,"success":false} 1178 | 2023-10-17 12:01:11.951 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90016, 'skuId': 0, 'success': False} 1179 | 2023-10-17 12:01:12.054 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1180 | 2023-10-17 12:01:12.141 | INFO | api.mobileApi:doOrderSumit:136 - 1181 | 1182 | 1183 | 抢购失败 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 |
1259 |
1260 | 1261 | 1262 | 1263 | 1264 |
1265 |
1266 | 1267 | 1268 | 1341 | 1342 | 1343 | 2023-10-17 12:01:12.155 | ERROR | api.mobileApi:doOrderSumit:142 - 发起订单错误: 1344 | 1345 | 1346 | 抢购失败 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 |
1422 |
1423 | 1424 | 1425 | 1426 | 1427 |
1428 |
1429 | 1430 | 1431 | 1504 | 1505 | 1506 | 2023-10-17 12:01:12.170 | INFO | __main__:loopSkill:74 - None 1507 | 2023-10-17 12:01:12.172 | INFO | api.mobileApi:doOrderSumit:134 - finalHeader======> 1508 | 2023-10-17 12:01:12.262 | INFO | api.mobileApi:doOrderSumit:136 - {"errorMessage":"很遗憾没有抢到,再接再厉哦。","orderId":0,"resultCode":90017,"skuId":0,"success":false} 1509 | 2023-10-17 12:01:12.264 | INFO | __main__:loopSkill:74 - {'errorMessage': '很遗憾没有抢到,再接再厉哦。', 'orderId': 0, 'resultCode': 90017, 'skuId': 0, 'success': False} 1510 | 2023-10-17 12:01:12.367 | INFO | __main__:loopSkill:83 - 抢购失败,重试次数20 1511 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import json 2 | from time import sleep 3 | from api import jdtime 4 | from api.mobileApi import JDAPi 5 | from loguru import logger 6 | from apscheduler.schedulers.blocking import BlockingScheduler 7 | import time 8 | from api.jdtime import local_jd_time_diff 9 | import datetime 10 | logger.add('./log/main_{time}.log',rotation="00:00",encoding='utf-8') 11 | def getOrderUrl(): 12 | url,token=jdApi.getToken() 13 | divideUrl=jdApi.getdivideUrlbyUNJump(url,token) 14 | if divideUrl==None: 15 | return None 16 | captchaUrl=jdApi.getCaptchaUrlbyDivide(divideUrl) 17 | if captchaUrl==None: 18 | return None 19 | skillUrl=jdApi.getSkillActionUrlbyCaptcha(captchaUrl) 20 | if divideUrl==None: 21 | return None 22 | return skillUrl 23 | 24 | 25 | # divideUrl=jdApi.getSkillUrl(url,token) 26 | def loopSkill(): 27 | timediff=local_jd_time_diff() 28 | sleepTime=1 29 | while 1: 30 | local_timestamp = round(time.time() * 1000) 31 | jdServerTime=local_timestamp-timediff 32 | # time_struct = time.gmtime(jdServerTime) 33 | dt = datetime.datetime.fromtimestamp(jdServerTime/1000) 34 | dtStr=dt.strftime("%Y-%m-%d %H:%M:%S.%f") 35 | h=dt.hour 36 | m=dt.minute 37 | s=dt.second 38 | sleep(sleepTime) 39 | # time_struct. 40 | if sleepTime==1: 41 | logger.info(f"当前时间:{dtStr}") 42 | #平时一秒执行一次 43 | #59的时候1毫秒执行1次 44 | if h>=11 and m>=59 and s>59: 45 | sleepTime=0.01 46 | if h>=12: 47 | break 48 | logger.info("当前时间,开始抢购...") 49 | retryTime=0 50 | retryMaxTime=200 51 | skillUrl="" 52 | 53 | while 1: 54 | skillUrl=getOrderUrl() 55 | if skillUrl=="https://marathon.jd.com/mobile/koFail.html" or skillUrl==None: 56 | retryTime=retryTime+1 57 | sleep(0.1) 58 | logger.info(f"获取抢购链接失败!,重试中,第{retryTime}次...") 59 | if retryTime>retryMaxTime: 60 | logger.info(f"抢购失败,重试次数{retryMaxTime}") 61 | break 62 | else: 63 | logger.info(f"获取抢购链接成功,链接地址:{skillUrl}") 64 | break 65 | if skillUrl=="": 66 | return "获取抢购链接失败,抢购结束" 67 | 68 | jdApi.doSkillAction(skillUrl) 69 | 70 | retryTime=0 71 | 72 | now=datetime.datetime.now() 73 | minute=now.minute 74 | while 1: 75 | result=jdApi.doOrderSumit() 76 | logger.info(result) 77 | try: 78 | resultCode=result["resultCode"] 79 | if resultCode==0: 80 | logger.info("抢购成功,请及时付款") 81 | break 82 | sleep(0.1) 83 | retryTime=retryTime+1 84 | logger.info(f"抢购失败,第次{retryTime}重试") 85 | if minute>=2: 86 | logger.info(f"抢购失败,重试次数{retryTime}") 87 | 88 | break 89 | except Exception as e: 90 | ee=str(e)[0:100] 91 | logger.info(f"抢购失败:{ee}") 92 | 93 | 94 | def appoint(): 95 | isAppoint=jdApi.isAppoint() 96 | logger.info(f"查询预约状态{isAppoint}") 97 | 98 | if isAppoint==False or isAppoint==None: 99 | r=jdApi.doAppoint() 100 | logger.info(f"预约结果{r}") 101 | 102 | if __name__ == '__main__': 103 | jdApi=JDAPi() 104 | logger.info("程序启动完成") 105 | scheduler = BlockingScheduler() 106 | scheduler.add_job(appoint, 'cron',hour=11,minute=32,second=10) 107 | logger.info("预约任务创建完成") 108 | scheduler.add_job(loopSkill, 'cron',hour=11,minute=58,second=30) 109 | logger.info("抢购任务创建完成") 110 | # loopSkill() 111 | 112 | scheduler.start() 113 | # appoint() 114 | # loopSkill() 115 | # getOrderUrl() 116 | -------------------------------------------------------------------------------- /sign/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/__init__.py -------------------------------------------------------------------------------- /sign/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /sign/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /sign/emu/emu.py: -------------------------------------------------------------------------------- 1 | from unicorn import * 2 | from unicorn.arm64_const import * 3 | from capstone import * 4 | table = [] 5 | 6 | 7 | def bytes2bin(bytes): 8 | arr = [] 9 | for v in [m for m in bytes]: 10 | arr.append( 11 | [(v & 128) >> 7, (v & 64) >> 6, (v & 32) >> 5, (v & 16) >> 4, (v & 8) >> 3, (v & 4) >> 2, (v & 2) >> 1, 12 | v & 1]) 13 | return [i for j in arr for i in j] 14 | 15 | 16 | def bin2bytes(arr): 17 | length = len(arr) // 8 18 | arr1 = [0 for _ in range(length)] 19 | for j in range(length): 20 | arr1[j] = arr[j * 8] << 7 | arr[j * 8 + 1] << 6 | arr[j * 8 + 2] << 5 | arr[j * 8 + 3] << 4 | arr[ 21 | j * 8 + 4] << 3 | arr[j * 8 + 5] << 2 | arr[j * 8 + 6] << 1 | arr[j * 8 + 7] 22 | return bytes(arr1) 23 | 24 | 25 | def read(name): 26 | with open(name, 'rb') as f: 27 | return f.read() 28 | 29 | 30 | def hook_code(mu, address, size, user_data): 31 | if address == BASE + 0x17638: 32 | arr2 = [] 33 | for byte in mu.mem_read(PLAINTEXT_ADDR, 8): 34 | arr2.append(byte) 35 | table.append([user_data.index(1), bytes2bin(arr2).index(1)]) 36 | 37 | 38 | if __name__ == "__main__": 39 | key0 = b'7d0069660c9b5d32074facf37c3738a1' 40 | mu = Uc(UC_ARCH_ARM64, CS_MODE_ARM) 41 | BASE = 0x400000 42 | STACK_ADDR = 0x0 43 | STACK_SIZE = 1024 * 2 44 | PLAINTEXT_ADDR = 1024 * 2 45 | PLAINTEXT_SIZE = 1024 46 | KEY_ADDR = 1024 * 3 47 | KEY_SIZE = 1024 48 | 49 | mu.mem_map(BASE, 1024 * 1024 * 1024) 50 | mu.mem_map(STACK_ADDR, STACK_SIZE) 51 | mu.mem_map(PLAINTEXT_ADDR, PLAINTEXT_SIZE) 52 | mu.mem_map(KEY_ADDR, KEY_SIZE) 53 | # mu.mem_write(BASE, read("F:\\Code\\Pycharm\\JDSign\\libjdbitmapkit.so")) 54 | mu.mem_write(BASE, read("./libjdbitmapkit.so")) 55 | mu.mem_write(KEY_ADDR, key0) 56 | 57 | for i in range(64): 58 | arr1 = [0 for j in range(64)] 59 | arr1[i] = 1 60 | h = mu.hook_add(UC_HOOK_CODE, hook_code, arr1) 61 | mu.reg_write(UC_ARM64_REG_SP, STACK_ADDR + STACK_SIZE - 1) 62 | mu.mem_write(PLAINTEXT_ADDR, bin2bytes(arr1)) 63 | mu.reg_write(UC_ARM64_REG_X1, KEY_ADDR) 64 | mu.reg_write(UC_ARM64_REG_X2, 16) 65 | mu.reg_write(UC_ARM64_REG_X3, PLAINTEXT_ADDR) 66 | mu.emu_start(BASE + 0x165e0, BASE + 0x1763c) 67 | mu.hook_del(h) 68 | print(table) -------------------------------------------------------------------------------- /sign/emu/emu2.py: -------------------------------------------------------------------------------- 1 | from unicorn import * 2 | from unicorn.arm64_const import * 3 | from capstone import * 4 | table = [] 5 | table1 = [] 6 | 7 | 8 | def bytes2bin(bytes): 9 | arr = [] 10 | for v in [m for m in bytes]: 11 | arr.append( 12 | [(v & 128) >> 7, (v & 64) >> 6, (v & 32) >> 5, (v & 16) >> 4, (v & 8) >> 3, (v & 4) >> 2, (v & 2) >> 1, 13 | v & 1]) 14 | return [i for j in arr for i in j] 15 | 16 | 17 | def bin2bytes(arr): 18 | length = len(arr) // 8 19 | arr1 = [0 for _ in range(length)] 20 | for j in range(length): 21 | arr1[j] = arr[j * 8] << 7 | arr[j * 8 + 1] << 6 | arr[j * 8 + 2] << 5 | arr[j * 8 + 3] << 4 | arr[ 22 | j * 8 + 4] << 3 | arr[j * 8 + 5] << 2 | arr[j * 8 + 6] << 1 | arr[j * 8 + 7] 23 | return bytes(arr1) 24 | 25 | 26 | def read(name): 27 | with open(name, 'rb') as f: 28 | return f.read() 29 | 30 | 31 | def hook_code(mu, address, size, user_data): 32 | if address == BASE + user_data[2] -4: 33 | table.append(bytes2bin(mu.mem_read(PLAINTEXT_ADDR, user_data[0]))) 34 | 35 | 36 | if __name__ == "__main__": 37 | key0 = b'7d0069660c9b5d32074facf37c3738a1' 38 | mu = Uc(UC_ARCH_ARM64, CS_MODE_ARM) 39 | BASE = 0x400000 40 | STACK_ADDR = 0x0 41 | STACK_SIZE = 1024 * 10 42 | PLAINTEXT_ADDR = 1024 * 10 43 | PLAINTEXT_SIZE = 1024 44 | KEY_ADDR = 1024 * 11 45 | KEY_SIZE = 1024 46 | 47 | mu.mem_map(BASE, 1024 * 1024 * 1024) 48 | mu.mem_map(STACK_ADDR, STACK_SIZE) 49 | mu.mem_map(PLAINTEXT_ADDR, PLAINTEXT_SIZE) 50 | mu.mem_map(KEY_ADDR, KEY_SIZE) 51 | # mu.mem_write(BASE, read("F:\\Code\\Pycharm\\JDSign\\libjdbitmapkit.so")) 52 | mu.mem_write(BASE, read("./libjdbitmapkit.so")) 53 | mu.mem_write(KEY_ADDR, key0) 54 | 55 | 56 | func_addr = [[1, 0x691c, 0x82c4], [2, 0x82cc, 0xa590], [3, 0xa598, 0xc89c], [4, 0xc8a4, 0xed0c], [5, 0xed14, 0x11300], [6, 0x11308, 0x13af0], [7, 0x13af8, 0x16464]] 57 | for addr in func_addr: 58 | for i in range(addr[0]*8 + 1): 59 | arr1 = [0 for j in range(addr[0]*8)] 60 | if i != 0: 61 | arr1[i - 1] = 1 62 | h = mu.hook_add(UC_HOOK_CODE, hook_code, addr) 63 | mu.reg_write(UC_ARM64_REG_SP, STACK_ADDR + STACK_SIZE - 1) 64 | mu.mem_write(PLAINTEXT_ADDR, bin2bytes(arr1)) 65 | mu.reg_write(UC_ARM64_REG_X0, KEY_ADDR) 66 | mu.reg_write(UC_ARM64_REG_X1, 32) 67 | mu.reg_write(UC_ARM64_REG_X2, 1) 68 | mu.reg_write(UC_ARM64_REG_X3, PLAINTEXT_ADDR) 69 | mu.emu_start(BASE + addr[1], BASE + addr[2]) 70 | mu.hook_del(h) 71 | for i in range(addr[0]*8): 72 | for j in range(addr[0]*8): 73 | arr3 = [] 74 | if table[0][j] != table[i + 1][j]: 75 | table1.append([i, j, table[0][j], table[i + 1][j]]) 76 | print("case %s 映射关系:"%(addr[0])) 77 | print(table1) 78 | table.clear() 79 | table1.clear() 80 | -------------------------------------------------------------------------------- /sign/libjdbitmapkit.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/libjdbitmapkit.so -------------------------------------------------------------------------------- /sign/sign/ModifiedBase64.py: -------------------------------------------------------------------------------- 1 | from ast import Str 2 | from json.tool import main 3 | 4 | 5 | class ModifiedBase64: 6 | def __init__(self) -> None: 7 | pass 8 | self.emptyBytes = bytearray().zfill(128) 9 | self.staticArray = ('K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/') 10 | self.initEmptyBytes() 11 | def initEmptyBytes(self): 12 | i=0 13 | ii=0 14 | while True: 15 | l=len( self.emptyBytes) 16 | if ii> (((2 - (i4 + 1)) * 2) + 2)) 51 | aa=a | b 52 | bArr2[i4]=aa 53 | i3=i3+1 54 | i7=0 55 | while i7<=i3-1: 56 | mybyteArray.append(bArr2[i7]) 57 | i7=i7+1 58 | return mybyteArray 59 | 60 | def encrypt(self,bt:bytes): 61 | sb = "" 62 | print(bt) 63 | for i in range(0,len(bt),3): 64 | bArr2 = bytearray().zfill(4) 65 | b = 0; 66 | for i2 in range(0,3): 67 | i3 = i + i2; 68 | if i3 <= len(bt)-1: 69 | bArr2[i2] = (b | ((bt[i3] & 255) >> ((i2 * 2) + 2))); 70 | b = ((((bt[i3] & 255) << (((2 - i2) * 2) + 2)) & 255) >> 2); 71 | else: 72 | bArr2[i2] = b; 73 | b = 0x40; 74 | 75 | bArr2[3] = b; 76 | for i4 in range(0,4): 77 | right=(63+255)%255 78 | if (bArr2[i4] <= right): 79 | sb=sb+self.staticArray[bArr2[i4]] 80 | else: 81 | sb=sb+'='; 82 | return sb 83 | 84 | 85 | def main(): 86 | modifiedBase64= ModifiedBase64(); 87 | 88 | strIn = "DJczEWU2DwPuDwDwYJOyDG=="; 89 | print(strIn) 90 | uuidByte=modifiedBase64.decrypt(strIn) 91 | uuidStr=str(uuidByte,"utf8") 92 | print(uuidStr) 93 | ss=modifiedBase64.encrypt(uuidByte) 94 | print(ss) 95 | 96 | 97 | if __name__ == '__main__': 98 | main() 99 | -------------------------------------------------------------------------------- /sign/sign/TenMagic16.py: -------------------------------------------------------------------------------- 1 | from sign.sign.Utils import * 2 | def remain1(data): 3 | table = [[0, 0, 0, 1], [1, 3, 0, 1], [2, 5, 1, 0], [3, 4, 0, 1], [4, 7, 0, 1], [5, 2, 1, 0], [6, 6, 1, 0], [7, 1, 1, 0]] 4 | arr = toBit(data) 5 | size = len(arr) 6 | arr1 = [0 for i in range(size)] 7 | for i in range(size): 8 | if arr[i] == 0: 9 | arr1[table[i][1]] = table[i][2] 10 | else: 11 | arr1[table[i][1]] = table[i][3] 12 | return toBytes(arr1) 13 | 14 | def remain2(data): 15 | table = [[0, 5, 1, 0], [1, 10, 0, 1], [2, 11, 1, 0], [3, 15, 1, 0], [4, 14, 0, 1], [5, 7, 1, 0], [6, 0, 0, 1], [7, 9, 1, 0], 16 | [8, 1, 1, 0], [9, 3, 0, 1], [10, 6, 0, 1], [11, 8, 0, 1], [12, 13, 0, 1], [13, 2, 1, 0], [14, 4, 1, 0], [15, 12, 0, 1]] 17 | arr = toBit(data) 18 | size = len(arr) 19 | arr1 = [0 for i in range(size)] 20 | for i in range(size): 21 | if arr[i] == 0: 22 | arr1[table[i][1]] = table[i][2] 23 | else: 24 | arr1[table[i][1]] = table[i][3] 25 | return toBytes(arr1) 26 | 27 | def remain3(data): 28 | table = [[0, 7, 1, 0], [1, 1, 1, 0], [2, 0, 0, 1], [3, 23, 0, 1], [4, 18, 0, 1], [5, 15, 1, 0], [6, 8, 1, 0], [7, 20, 0, 1], 29 | [8, 13, 0, 1], [9, 11, 0, 1], [10, 3, 1, 0], [11, 4, 1, 0], [12, 16, 0, 1], [13, 5, 1, 0], [14, 14, 0, 1], [15, 21, 1, 0], 30 | [16, 17, 0, 1], [17, 22, 0, 1], [18, 6, 1, 0], [19, 12, 0, 1], [20, 9, 0, 1], [21, 19, 0, 1], [22, 2, 0, 1], [23, 10, 1, 0]] 31 | arr = toBit(data) 32 | size = len(arr) 33 | arr1 = [0 for i in range(size)] 34 | for i in range(size): 35 | if arr[i] == 0: 36 | arr1[table[i][1]] = table[i][2] 37 | else: 38 | arr1[table[i][1]] = table[i][3] 39 | return toBytes(arr1) 40 | 41 | def remain4(data): 42 | table = [[0, 20, 1, 0], [1, 3, 1, 0], [2, 14, 1, 0], [3, 5, 1, 0], [4, 9, 0, 1], [5, 13, 0, 1], [6, 8, 0, 1], [7, 17, 0, 1], 43 | [8, 6, 1, 0], [9, 18, 0, 1], [10, 22, 1, 0], [11, 7, 0, 1], [12, 24, 1, 0], [13, 31, 1, 0], [14, 16, 0, 1], [15, 0, 0, 1], 44 | [16, 23, 0, 1], [17, 10, 0, 1], [18, 11, 0, 1], [19, 15, 1, 0], [20, 19, 0, 1], [21, 28, 0, 1], [22, 4, 0, 1], [23, 1, 0, 1], 45 | [24, 26, 0, 1], [25, 30, 0, 1], [26, 21, 1, 0], [27, 29, 0, 1], [28, 12, 0, 1], [29, 27, 1, 0], [30, 2, 1, 0], [31, 25, 0, 1]] 46 | arr = toBit(data) 47 | size = len(arr) 48 | arr1 = [0 for i in range(size)] 49 | for i in range(size): 50 | if arr[i] == 0: 51 | arr1[table[i][1]] = table[i][2] 52 | else: 53 | arr1[table[i][1]] = table[i][3] 54 | return toBytes(arr1) 55 | 56 | def remain5(data): 57 | table = [[0, 16, 0, 1], [1, 24, 1, 0], [2, 6, 0, 1], [3, 17, 0, 1], [4, 2, 0, 1], [5, 1, 1, 0], [6, 14, 1, 0], [7, 33, 0, 1], 58 | [8, 31, 0, 1], [9, 32, 1, 0], [10, 7, 1, 0], [11, 8, 0, 1], [12, 20, 1, 0], [13, 0, 1, 0], [14, 39, 0, 1], [15, 29, 1, 0], 59 | [16, 34, 0, 1], [17, 10, 1, 0], [18, 27, 1, 0], [19, 3, 0, 1], [20, 19, 0, 1], [21, 18, 1, 0], [22, 22, 1, 0], [23, 4, 0, 1], 60 | [24, 37, 1, 0], [25, 9, 1, 0], [26, 13, 1, 0], [27, 38, 1, 0], [28, 12, 0, 1], [29, 21, 0, 1], [30, 23, 0, 1], [31, 25, 0, 1], 61 | [32, 11, 1, 0], [33, 5, 1, 0], [34, 26, 0, 1], [35, 35, 0, 1], [36, 28, 0, 1], [37, 30, 1, 0], [38, 15, 1, 0], [39, 36, 0, 1]] 62 | arr = toBit(data) 63 | size = len(arr) 64 | arr1 = [0 for i in range(size)] 65 | for i in range(size): 66 | if arr[i] == 0: 67 | arr1[table[i][1]] = table[i][2] 68 | else: 69 | arr1[table[i][1]] = table[i][3] 70 | return toBytes(arr1) 71 | 72 | def remain6(data): 73 | table = [[0, 11, 1, 0], [1, 44, 1, 0], [2, 9, 0, 1], [3, 17, 0, 1], [4, 47, 0, 1], [5, 1, 1, 0], [6, 14, 1, 0], [7, 23, 0, 1], 74 | [8, 31, 0, 1], [9, 25, 0, 1], [10, 29, 1, 0], [11, 8, 0, 1], [12, 5, 1, 0], [13, 0, 1, 0], [14, 43, 1, 0], [15, 45, 1, 0], 75 | [16, 34, 0, 1], [17, 10, 1, 0], [18, 27, 1, 0], [19, 16, 1, 0], [20, 24, 1, 0], [21, 18, 1, 0], [22, 22, 1, 0], [23, 30, 1, 0], 76 | [24, 6, 0, 1], [25, 13, 0, 1], [26, 7, 0, 1], [27, 28, 1, 0], [28, 4, 0, 1], [29, 26, 1, 0], [30, 46, 1, 0], [31, 42, 1, 0], 77 | [32, 40, 0, 1], [33, 3, 1, 0], [34, 41, 1, 0], [35, 35, 0, 1], [36, 37, 0, 1], [37, 15, 0, 1], [38, 20, 1, 0], [39, 36, 0, 1], 78 | [40, 12, 1, 0], [41, 33, 1, 0], [42, 38, 1, 0], [43, 32, 1, 0], [44, 19, 0, 1], [45, 21, 0, 1], [46, 2, 1, 0], [47, 39, 0, 1]] 79 | arr = toBit(data) 80 | size = len(arr) 81 | arr1 = [0 for i in range(size)] 82 | for i in range(size): 83 | if arr[i] == 0: 84 | arr1[table[i][1]] = table[i][2] 85 | else: 86 | arr1[table[i][1]] = table[i][3] 87 | return toBytes(arr1) 88 | 89 | def remain7(data): 90 | table = [[0, 11, 1, 0], [1, 44, 0, 1], [2, 8, 1, 0], [3, 38, 0, 1], [4, 20, 0, 1], [5, 4, 1, 0], [6, 9, 0, 1], [7, 23, 0, 1], 91 | [8, 1, 1, 0], [9, 25, 0, 1], [10, 29, 1, 0], [11, 47, 0, 1], [12, 5, 1, 0], [13, 45, 0, 1], [14, 43, 1, 0], [15, 35, 0, 1], 92 | [16, 7, 0, 1], [17, 40, 0, 1], [18, 31, 0, 1], [19, 21, 0, 1], [20, 24, 1, 0], [21, 32, 0, 1], [22, 54, 1, 0], [23, 30, 1, 0], 93 | [24, 14, 1, 0], [25, 13, 0, 1], [26, 17, 0, 1], [27, 28, 1, 0], [28, 36, 0, 1], [29, 55, 0, 1], [30, 22, 1, 0], [31, 42, 1, 0], 94 | [32, 27, 0, 1], [33, 51, 1, 0], [34, 49, 1, 0], [35, 46, 0, 1], [36, 53, 0, 1], [37, 15, 0, 1], [38, 16, 0, 1], [39, 26, 1, 0], 95 | [40, 12, 1, 0], [41, 18, 1, 0], [42, 50, 1, 0], [43, 34, 1, 0], [44, 19, 0, 1], [45, 41, 0, 1], [46, 2, 1, 0], [47, 39, 0, 1], 96 | [48, 3, 1, 0], [49, 10, 1, 0], [50, 52, 1, 0], [51, 0, 1, 0], [52, 6, 1, 0], [53, 33, 0, 1], [54, 37, 1, 0], [55, 48, 0, 1]] 97 | arr = toBit(data) 98 | size = len(arr) 99 | arr1 = [0 for i in range(size)] 100 | for i in range(size): 101 | if arr[i] == 0: 102 | arr1[table[i][1]] = table[i][2] 103 | else: 104 | arr1[table[i][1]] = table[i][3] 105 | return toBytes(arr1) 106 | 107 | def TenMagic16_enc(input): 108 | table = [[0, 12], [1, 62], [2, 19], [3, 48], [4, 13], [5, 40], [6, 30], [7, 49], [8, 31], [9, 24], [10, 45], 109 | [11, 61], [12, 51], [13, 4], [14, 28], [15, 3], [16, 7], [17, 58], [18, 53], [19, 1], [20, 36], 110 | [21, 21], [22, 22], [23, 39], [24, 54], [25, 25], [26, 26], [27, 6], [28, 52], [29, 10], [30, 5], 111 | [31, 50], [32, 8], [33, 46], [34, 17], [35, 16], [36, 9], [37, 37], [38, 38], [39, 57], [40, 20], 112 | [41, 41], [42, 42], [43, 23], [44, 11], [45, 34], [46, 29], [47, 44], [48, 15], [49, 14], [50, 2], 113 | [51, 60], [52, 47], [53, 43], [54, 18], [55, 35], [56, 32], [57, 27], [58, 33], [59, 55], [60, 63], 114 | [61, 56], [62, 59], [63, 0]] 115 | arr = input 116 | arr1 = [0 for i in range(len(arr))] 117 | for i in range(len(table)): 118 | arr1[table[i][1]] = arr[table[i][0]] 119 | return toBytes(arr1) 120 | 121 | 122 | def TenMagic16(data, data_len): 123 | print("TenMagic16") 124 | key = "7d0069660c9b5d32074facf37c3738a1" 125 | 126 | split_num = data_len // 8 127 | remain = data_len % 8 128 | result = b"" 129 | for i in range(split_num): 130 | data_bit = toBit(data[8*i : 8*i + 8]) 131 | result += TenMagic16_enc(data_bit) 132 | switcher = { 133 | 1: remain1, 134 | 2: remain2, 135 | 3: remain3, 136 | 4: remain4, 137 | 5: remain5, 138 | 6: remain6, 139 | 7: remain7 140 | } 141 | if remain != 0: 142 | result += switcher[remain](data[split_num*8:]) 143 | 144 | return result -------------------------------------------------------------------------------- /sign/sign/TenMagic32.py: -------------------------------------------------------------------------------- 1 | from sign.sign.Utils import * 2 | def remain1(data): 3 | table = [[0, 6, 0, 1], [1, 4, 1, 0], [2, 5, 0, 1], [3, 0, 0, 1], [4, 2, 0, 1], [5, 3, 0, 1], [6, 1, 1, 0], 4 | [7, 7, 0, 1]] 5 | arr = toBit(data) 6 | size = len(arr) 7 | arr1 = [0 for i in range(size)] 8 | for i in range(size): 9 | if arr[i] == 0: 10 | arr1[table[i][1]] = table[i][2] 11 | else: 12 | arr1[table[i][1]] = table[i][3] 13 | return toBytes(arr1) 14 | 15 | def remain2(data): 16 | table = [[0, 5, 0, 1], [1, 9, 0, 1], [2, 0, 1, 0], [3, 7, 1, 0], [4, 10, 0, 1], [5, 6, 0, 1], [6, 13, 1, 0], [7, 1, 0, 1], 17 | [8, 4, 0, 1], [9, 11, 0, 1], [10, 14, 1, 0], [11, 3, 1, 0], [12, 12, 0, 1], [13, 15, 1, 0], [14, 8, 0, 1], [15, 2, 0, 1]] 18 | arr = toBit(data) 19 | size = len(arr) 20 | arr1 = [0 for i in range(size)] 21 | for i in range(size): 22 | if arr[i] == 0: 23 | arr1[table[i][1]] = table[i][2] 24 | else: 25 | arr1[table[i][1]] = table[i][3] 26 | return toBytes(arr1) 27 | 28 | def remain3(data): 29 | table = [[0, 17, 0, 1], [1, 7, 0, 1], [2, 5, 0, 1], [3, 19, 1, 0], [4, 18, 0, 1], [5, 15, 1, 0], [6, 22, 0, 1], [7, 21, 0, 1], 30 | [8, 16, 0, 1], [9, 4, 0, 1], [10, 12, 0, 1], [11, 2, 1, 0], [12, 10, 1, 0], [13, 13, 1, 0], [14, 20, 1, 0], [15, 8, 1, 0], 31 | [16, 9, 0, 1], [17, 23, 0, 1], [18, 11, 1, 0], [19, 6, 0, 1], [20, 1, 0, 1], [21, 3, 1, 0], [22, 0, 1, 0], [23, 14, 0, 1]] 32 | arr = toBit(data) 33 | size = len(arr) 34 | arr1 = [0 for i in range(size)] 35 | for i in range(size): 36 | if arr[i] == 0: 37 | arr1[table[i][1]] = table[i][2] 38 | else: 39 | arr1[table[i][1]] = table[i][3] 40 | return toBytes(arr1) 41 | 42 | def remain4(data): 43 | table = [[0, 25, 1, 0], [1, 4, 0, 1], [2, 29, 0, 1], [3, 1, 0, 1], [4, 27, 1, 0], [5, 18, 1, 0], [6, 23, 1, 0], [7, 14, 1, 0], 44 | [8, 28, 1, 0], [9, 11, 0, 1], [10, 9, 1, 0], [11, 13, 0, 1], [12, 24, 1, 0], [13, 0, 1, 0], [14, 5, 0, 1], [15, 2, 1, 0], 45 | [16, 26, 0, 1], [17, 12, 0, 1], [18, 31, 1, 0], [19, 16, 1, 0], [20, 30, 0, 1], [21, 15, 0, 1], [22, 10, 0, 1], [23, 22, 1, 0], 46 | [24, 7, 1, 0], [25, 21, 0, 1], [26, 6, 1, 0], [27, 3, 1, 0], [28, 8, 1, 0], [29, 20, 0, 1], [30, 19, 1, 0], [31, 17, 0, 1]] 47 | arr = toBit(data) 48 | size = len(arr) 49 | arr1 = [0 for i in range(size)] 50 | for i in range(size): 51 | if arr[i] == 0: 52 | arr1[table[i][1]] = table[i][2] 53 | else: 54 | arr1[table[i][1]] = table[i][3] 55 | return toBytes(arr1) 56 | 57 | def remain5(data): 58 | table = [[0, 11, 0, 1], [1, 12, 0, 1], [2, 28, 1, 0], [3, 30, 0, 1], [4, 13, 1, 0], [5, 24, 0, 1], [6, 22, 1, 0], [7, 25, 1, 0], 59 | [8, 23, 1, 0], [9, 3, 0, 1], [10, 16, 0, 1], [11, 8, 1, 0], [12, 34, 0, 1], [13, 2, 0, 1], [14, 5, 0, 1], [15, 7, 1, 0], 60 | [16, 4, 0, 1], [17, 14, 0, 1], [18, 39, 1, 0], [19, 33, 0, 1], [20, 15, 0, 1], [21, 0, 0, 1], [22, 31, 0, 1], [23, 9, 1, 0], 61 | [24, 29, 0, 1], [25, 26, 1, 0], [26, 19, 0, 1], [27, 6, 1, 0], [28, 27, 1, 0], [29, 10, 1, 0], [30, 37, 0, 1], [31, 38, 1, 0], 62 | [32, 20, 0, 1], [33, 21, 1, 0], [34, 1, 0, 1], [35, 36, 0, 1], [36, 32, 0, 1], [37, 17, 0, 1], [38, 18, 0, 1], [39, 35, 1, 0]] 63 | arr = toBit(data) 64 | size = len(arr) 65 | arr1 = [0 for i in range(size)] 66 | for i in range(size): 67 | if arr[i] == 0: 68 | arr1[table[i][1]] = table[i][2] 69 | else: 70 | arr1[table[i][1]] = table[i][3] 71 | return toBytes(arr1) 72 | 73 | def remain6(data): 74 | table = [[0, 11, 0, 1], [1, 45, 0, 1], [2, 15, 1, 0], [3, 22, 0, 1], [4, 10, 0, 1], [5, 7, 0, 1], [6, 3, 0, 1], [7, 42, 0, 1], 75 | [8, 17, 1, 0], [9, 21, 0, 1], [10, 4, 0, 1], [11, 8, 1, 0], [12, 19, 1, 0], [13, 32, 0, 1], [14, 28, 1, 0], [15, 31, 1, 0], 76 | [16, 29, 0, 1], [17, 14, 1, 0], [18, 39, 1, 0], [19, 27, 1, 0], [20, 2, 1, 0], [21, 24, 0, 1], [22, 26, 1, 0], [23, 9, 1, 0], 77 | [24, 41, 0, 1], [25, 1, 1, 0], [26, 47, 0, 1], [27, 44, 0, 1], [28, 23, 1, 0], [29, 0, 1, 0], [30, 12, 1, 0], [31, 18, 0, 1], 78 | [32, 33, 0, 1], [33, 36, 0, 1], [34, 40, 1, 0], [35, 34, 0, 1], [36, 25, 0, 1], [37, 16, 1, 0], [38, 5, 1, 0], [39, 35, 0, 1], 79 | [40, 38, 0, 1], [41, 37, 1, 0], [42, 13, 0, 1], [43, 20, 1, 0], [44, 6, 0, 1], [45, 43, 0, 1], [46, 30, 0, 1], [47, 46, 1, 0]] 80 | arr = toBit(data) 81 | size = len(arr) 82 | arr1 = [0 for i in range(size)] 83 | for i in range(size): 84 | if arr[i] == 0: 85 | arr1[table[i][1]] = table[i][2] 86 | else: 87 | arr1[table[i][1]] = table[i][3] 88 | return toBytes(arr1) 89 | 90 | def remain7(data): 91 | table = [[0, 7, 1, 0], [1, 9, 0, 1], [2, 53, 1, 0], [3, 19, 1, 0], [4, 15, 1, 0], [5, 8, 0, 1], [6, 3, 0, 1], [7, 24, 1, 0], 92 | [8, 18, 0, 1], [9, 51, 0, 1], [10, 42, 1, 0], [11, 39, 0, 1], [12, 20, 0, 1], [13, 12, 0, 1], [14, 28, 1, 0], [15, 27, 1, 0], 93 | [16, 23, 0, 1], [17, 49, 0, 1], [18, 10, 1, 0], [19, 55, 1, 0], [20, 52, 1, 0], [21, 17, 0, 1], [22, 48, 0, 1], [23, 14, 1, 0], 94 | [24, 33, 0, 1], [25, 25, 1, 0], [26, 4, 1, 0], [27, 11, 0, 1], [28, 47, 1, 0], [29, 0, 0, 1], [30, 21, 1, 0], [31, 44, 0, 1], 95 | [32, 16, 0, 1], [33, 41, 0, 1], [34, 29, 0, 1], [35, 1, 0, 1], [36, 46, 0, 1], [37, 5, 0, 1], [38, 30, 0, 1], [39, 45, 0, 1], 96 | [40, 31, 1, 0], [41, 43, 1, 0], [42, 36, 1, 0], [43, 26, 0, 1], [44, 34, 0, 1], [45, 2, 0, 1], [46, 6, 0, 1], [47, 50, 1, 0], 97 | [48, 13, 1, 0], [49, 37, 1, 0], [50, 32, 0, 1], [51, 40, 0, 1], [52, 35, 0, 1], [53, 38, 0, 1], [54, 54, 0, 1], [55, 22, 0, 1]] 98 | arr = toBit(data) 99 | size = len(arr) 100 | arr1 = [0 for i in range(size)] 101 | for i in range(size): 102 | if arr[i] == 0: 103 | arr1[table[i][1]] = table[i][2] 104 | else: 105 | arr1[table[i][1]] = table[i][3] 106 | return toBytes(arr1) 107 | 108 | def TenMagic32_enc(input): 109 | table = [[0, 0], [1, 4], [2, 61], [3, 15], [4, 56], [5, 40], [6, 6], [7, 59], [8, 62], [9, 58], [10, 17], [11, 2], 110 | [12, 12], [13, 8], [14, 32], [15, 60], [16, 13], [17, 45], [18, 34], [19, 14], [20, 36], [21, 21], 111 | [22, 22], [23, 39], [24, 23], [25, 25], [26, 26], [27, 20], [28, 1], [29, 33], [30, 46], [31, 55], 112 | [32, 35], [33, 24], [34, 57], [35, 19], [36, 53], [37, 37], [38, 38], [39, 5], [40, 30], [41, 41], 113 | [42, 42], [43, 18], [44, 47], [45, 27], [46, 9], [47, 44], [48, 51], [49, 7], [50, 49], [51, 63], [52, 28], 114 | [53, 43], [54, 54], [55, 52], [56, 31], [57, 10], [58, 29], [59, 11], [60, 3], [61, 16], [62, 50], 115 | [63, 48]] 116 | arr = input 117 | arr1 = [0 for i in range(len(arr))] 118 | for i in range(len(table)): 119 | arr1[table[i][1]] = arr[table[i][0]] 120 | return toBytes(arr1) 121 | 122 | 123 | def TenMagic32(data, data_len): 124 | print("TenMagic32") 125 | key = "44e715a6e322ccb7d028f7a42fa55040" 126 | split_num = data_len // 8 127 | remain = data_len % 8 128 | result = b"" 129 | for i in range(split_num): 130 | data_bit = toBit(data[8*i : 8*i + 8]) 131 | result += TenMagic32_enc(data_bit) 132 | switcher = { 133 | 1: remain1, 134 | 2: remain2, 135 | 3: remain3, 136 | 4: remain4, 137 | 5: remain5, 138 | 6: remain6, 139 | 7: remain7 140 | } 141 | if remain != 0: 142 | result += switcher[remain](data[split_num*8:]) 143 | 144 | return result -------------------------------------------------------------------------------- /sign/sign/TenSeattos.py: -------------------------------------------------------------------------------- 1 | from sign.sign.Utils import * 2 | def TenSeattos(data, data_len): 3 | print("TenSeattos") 4 | key = "80306f4370b39fd5630ad0529f77adb6" 5 | meta_data = [0x37, 0x92, 0x44, 0x68, 0xA5, 0x3D, 0xCC, 0x7F, 0xBB, 0x0F, 0xD9, 0x88, 0xEE, 0x9A, 0xE9, 0x5A] 6 | arr = [0] * data_len 7 | for i in range(data_len): 8 | arr[i] = ord(data[i]) 9 | arr[i] ^= ord(key[i&7]) ^ meta_data[i&0xf] 10 | arr[i] += meta_data[i&0xf] 11 | arr[i] &= 0xff 12 | arr[i] ^= meta_data[i&0xf] 13 | arr[i] ^= ord(key[i&7]) 14 | return bytes(arr) -------------------------------------------------------------------------------- /sign/sign/Utils.py: -------------------------------------------------------------------------------- 1 | from hashlib import md5 2 | import base64 3 | 4 | def toBit(data): 5 | data_bit = [] 6 | for i in range(len(data)): 7 | xor_data = 0x80 8 | for j in range(8): 9 | data_bit.append(0 if (ord(data[i]) & xor_data) == 0 else 1) 10 | xor_data >>= 1 11 | return data_bit 12 | 13 | def toBytes(data): 14 | arr1 = [] 15 | for i in range(0, len(data), 8): 16 | tmp = 0 17 | for j in range(8): 18 | tmp <<= 1 19 | tmp |= data[i+j] 20 | arr1.append(tmp) 21 | return bytes(arr1) 22 | 23 | def hash(data): 24 | md = md5() 25 | md.update(base64.b64encode(data)) 26 | return md.hexdigest() -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenMagic16.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenMagic16.cpython-310.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenMagic16.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenMagic16.cpython-37.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenMagic16.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenMagic16.cpython-39.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenMagic32.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenMagic32.cpython-310.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenMagic32.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenMagic32.cpython-37.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenMagic32.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenMagic32.cpython-39.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenSeattos.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenSeattos.cpython-310.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenSeattos.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenSeattos.cpython-37.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/TenSeattos.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/TenSeattos.cpython-39.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/Utils.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/Utils.cpython-310.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/Utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/Utils.cpython-37.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/Utils.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/Utils.cpython-39.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/jdSign.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/jdSign.cpython-310.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/jdSign.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/jdSign.cpython-37.pyc -------------------------------------------------------------------------------- /sign/sign/__pycache__/jdSign.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fuuhoo/mtforjd/64ec88fd6b857dc0e20ae0dc19ecc28e3b78cf8b/sign/sign/__pycache__/jdSign.cpython-39.pyc -------------------------------------------------------------------------------- /sign/sign/jdSign.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | import time 3 | import uuid 4 | from sign.sign.TenMagic16 import TenMagic16 5 | from sign.sign.TenMagic32 import TenMagic32 6 | from sign.sign.TenSeattos import TenSeattos 7 | 8 | from sign.sign.Utils import * 9 | 10 | def encrypt(data, data_len, encryptId, offset): 11 | encryptType = [0, 1, 2][offset:] + [0, 1, 2][0:offset] 12 | encrypt = encryptType[encryptId] 13 | switcher = { 14 | 0: TenMagic32, 15 | 1: TenMagic16, 16 | 2: TenSeattos 17 | } 18 | 19 | return switcher[encrypt](data, data_len) 20 | 21 | def getSignTest(functionId, body, uuid, client, clientVersion): 22 | st = "1696996798818" 23 | # encryptId = randint(0, 2) 24 | # offset = randint(0, 2) 25 | encryptId=0 26 | offset=0 27 | sv = "1" + str(offset) + str(encryptId) 28 | data = "&".join(("functionId="+functionId, "body="+body, "uuid="+uuid,"client="+client, "clientVersion="+clientVersion, "st="+st, "sv="+sv)) 29 | sign = hash(encrypt(data, len(data), encryptId, offset)) 30 | print("st=" + st + "&sign=" + sign + "&sv=" + sv) 31 | return sign 32 | 33 | def getSign(functionId, body, uuid, client, clientVersion): 34 | t = time.time() 35 | st = str(int(round(t * 1000))) 36 | encryptId = randint(0, 2) 37 | offset = randint(0, 2) 38 | sv = "1" + str(offset) + str(encryptId) 39 | data = "&".join(("functionId="+functionId, "body="+body, "uuid="+uuid, "client="+client, "clientVersion="+clientVersion, "st="+st, "sv="+sv)) 40 | sign = hash(encrypt(data, len(data), encryptId, offset)) 41 | print("st=" + st + "&sign=" + sign + "&sv=" + sv) 42 | return sign 43 | 44 | def getSignWithstv(functionId, body, uuid, client, clientVersion): 45 | t = time.time() 46 | st = str(int(round(t * 1000))) 47 | encryptId = randint(0, 2) 48 | offset = randint(0, 2) 49 | sv = "1" + str(offset) + str(encryptId) 50 | data = "&".join(("functionId="+functionId, "body="+body, "uuid="+uuid, "client="+client, "clientVersion="+clientVersion, "st="+st, "sv="+sv)) 51 | sign = hash(encrypt(data, len(data), encryptId, offset)) 52 | print("st=" + st + "&sign=" + sign + "&sv=" + sv) 53 | return "st=" + st + "&sign=" + sign + "&sv=" + sv 54 | #test 55 | 56 | def main(): 57 | pass 58 | 59 | if __name__ == "__main__": 60 | main() 61 | -------------------------------------------------------------------------------- /sign/sign/test.py: -------------------------------------------------------------------------------- 1 | from email import header 2 | import requests 3 | from urllib.parse import urlencode 4 | import time 5 | from jdSign import getSignWithstv 6 | base_url = "https://api.m.jd.com/client.action?" 7 | 8 | t = time.time() 9 | st = str(int(round(t * 1000))) 10 | 11 | 12 | ep={"hdid":"JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw=","ts":st,"ridx":-1,"cipher":{"area":"CJDpCJOnCv80DtY2DV80DtY5EK==","d_model":"UwVubWvBCtLGcw8=","wifiBssid":"CNUzDzY2ZNc0YzCzCzGyCWO0DwVvCQU4YzvtCtPvCNY=","osVersion":"CJO=","d_brand":"WQvrb21f","screen":"CtS5DsenCNqm","uuid":"DJczEWU2DwPuDwDwYJOyDG==","aid":"DJczEWU2DwPuDwDwYJOyDG==","openudid":"DJczEWU2DwPuDwDwYJOyDG=="},"ciphertype":5,"version":"1.2.0","appname":"com.jingdong.app.mall"} 13 | 14 | QueryString = { 15 | "functionId" : "genToken", 16 | "clientVersion" : "12.1.6", 17 | "client" : "android", 18 | "eid" : "eidA3e84812360sacXOyFYL7RzSoHKB6uKa4iHFzs4POXUYzjOnVvYofGycBrOdsifIwt1UwAVkAunyz709VQTMOypkJdxy6bvkxcIW0AL\/SAB56\/RdZ", 19 | "ef" : "1", 20 | "ep" :ep 21 | } 22 | 23 | uuid = "5739e66ad6cfa125" 24 | 25 | headers = { 26 | 'Cookie': 'wskey=AAJlI13fAED3bo2St9L3k7BtSWiOSmNW5GfFKKzCeCp_7CuVjWy-jmu70HjUVm_vf6NTe_M7NJUJ6cIlRV4QrLwvm7ysUZKF;whwswswws=JD012145b9dZY1rTRef5169699667634902jEiAj2LtRxRCNo4U_8O5WmfjEcI5F3Byg-7LI263gNkavW6r9dxbqwVA8XTLtcbjRTqO-MaBeZixii_WrRbrQQ1vvy3np~AAkNI4hyLEAAAAAAAAAAAAAAAAFc55mrWz6ElfwAAAAZmdXVob28;unionwsws={"devicefinger":"eidA3e84812360sacXOyFYL7RzSoHKB6uKa4iHFzs4POXUYzjOnVvYofGycBrOdsifIwt1UwAVkAunyz709VQTMOypkJdxy6bvkxcIW0AL\\/SAB56\\/RdZ","jmafinger":"JD012145b9dZY1rTRef5169699667634902jEiAj2LtRxRCNo4U_8O5WmfjEcI5F3Byg-7LI263gNkavW6r9dxbqwVA8XTLtcbjRTqO-MaBeZixii_WrRbrQQ1vvy3np~AAkNI4hyLEAAAAAAAAAAAAAAAAFc55mrWz6ElfwAAAAZmdXVob28"};pin_hash=-1263152894;', 27 | 'Connection': 'keep-alive', 28 | 'User-Agent': 'okhttp/3.12.16;jdmall;android;version/12.1.6;build/98973;', 29 | 'X-Referer-Package': 'com.jingdong.app.mall', 30 | 'Charset': 'UTF-8', 31 | 'X-Referer-Page': 'com.jingdong.app.mall.WebActivity', 32 | 'Accept-Encoding': 'br,gzip,deflate', 33 | 'Cache-Control': 'no-cache', 34 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 35 | 'Host': 'api.m.jd.com', 36 | } 37 | 38 | 39 | 40 | post_data = { 41 | "body" : '{"action":"to","to":"https%3A%2F%2Fdivide.jd.com%2Fuser_routing%3FskuId%3D100012043978%26from%3Dapp"}&' 42 | } 43 | def parse_url(inData : dict): 44 | return base_url + urlencode(inData) + "&" + getSignWithstv(inData["functionId"], post_data["body"], uuid, inData["client"], inData["clientVersion"]) 45 | 46 | url = parse_url(QueryString) 47 | r = requests.post(url, data = post_data,headers=headers) 48 | print(r.text) 49 | 50 | 51 | --------------------------------------------------------------------------------