MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / get_ticket

Function get_ticket

tianyi.py:161–176  ·  view source on GitHub ↗
(phone, userId, token)

Source from the content-addressed store, hash-verified

159 return None
160
161def get_ticket(phone, userId, token):
162 import re
163 timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
164 xml_data = f'<Request><HeaderInfos><Code>getSingle</Code><Timestamp>{timestamp}</Timestamp>' \
165 f'<BroadAccount></BroadAccount><BroadToken></BroadToken>' \
166 f'<ClientType>#9.6.1#channel50#iPhone 14 Pro Max#</ClientType><ShopId>20002</ShopId>' \
167 f'<Source>110003</Source><SourcePassword>Sid98s</SourcePassword><Token>{token}</Token>' \
168 f'<UserLoginName>{phone}</UserLoginName></HeaderInfos><Content><Attach>test</Attach>' \
169 f'<FieldData><TargetId>{encrypt_3des(userId)}</TargetId>' \
170 f'<Url>4a6862274835b451</Url></FieldData></Content></Request>'
171 r = ss.post('https://appgologin.189.cn:9031/map/clientXML', data=xml_data,
172 headers={'user-agent': 'CtClient;10.4.1;Android;13;22081212C;NTQzNzgx!#!MTgwNTg1'})
173 tk = re.findall('<Ticket>(.*?)</Ticket>', r.text)
174 if tk:
175 return decrypt_3des(tk[0])
176 return None
177
178def sso_login_v2(ticket):
179 payload = {"portal": "45", "channelId": CHANNEL_ID, "ticket": ticket}

Callers 2

process_new_year_lotteryFunction · 0.85
process_accountFunction · 0.85

Calls 3

encrypt_3desFunction · 0.85
decrypt_3desFunction · 0.85
postMethod · 0.45

Tested by

no test coverage detected