| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- # -*- coding: utf-8 -*-
- # Author : Charley
- # Python : 3.10.8
- # Date : 2025/7/17 13:19
- import time
- import requests
- from get_sign import get_sign
- HEADERS = {
- "User-Agent": "Mozilla/5.0 (Linux; Android 11; Pixel 5 Build/RQ3A.211001.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 uni-app Html5Plus/1.0 (Immersed/52.727272)",
- "Connection": "Keep-Alive",
- "Accept": "application/json",
- "Accept-Encoding": "gzip",
- "Content-Type": "application/json",
- "Cache-Control": "no-cache",
- # "sign": "fd46b7d70f03e77686ecb2c149409742",
- "x-token": "",
- "client": "yingyongbao",
- "appversion": "2.6.20",
- # "nonce": "46e7c3842eaaf5e1",
- "deviceid": "null",
- "jrd": "100d85590861f713a85",
- # "timestamp": "1752729582950"
- }
- def send_msg():
- url = "https://api.xingchao6.com/AppClient/v1/util/vcode/send"
- ts = int((time.time()) * 1000)
- data = {
- "phone": phone,
- "type": 1,
- "timestamp": ts
- }
- sign, nonce = get_sign(data, ts)
- headers = HEADERS.copy()
- headers["sign"] = sign
- headers["nonce"] = nonce
- headers["timestamp"] = str(ts)
- response = requests.post(url, headers=headers, json=data)
- print(response.text)
- def login():
- url = "https://api.xingchao6.com/AppClient/v1/auth/login/phone"
- ts = int((time.time()) * 1000)
- data = {
- "phone": phone,
- # "code": "977196",
- "code": sms_code,
- "timestamp": ts
- }
- sign, nonce = get_sign(data, ts)
- headers = HEADERS.copy()
- headers["sign"] = sign
- headers["nonce"] = nonce
- headers["timestamp"] = str(ts)
- response = requests.post(url, headers=headers, json=data)
- print(response.text)
- if __name__ == '__main__':
- phone = '19521500850'
- # phone = '13014617614'
- send_msg()
- sms_code = input("请输入短信验证码:")
- login()
|