(phone, password)
| 128 | return accounts |
| 129 | |
| 130 | def userLoginNormal(phone, password): |
| 131 | timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S") |
| 132 | rdmstr = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', k=16)) |
| 133 | login_cipher = f'iPhone 14 15.4.{rdmstr[:12]}{phone}{timestamp}{password}0$$$0.' |
| 134 | payload = { |
| 135 | "headerInfos": { |
| 136 | "code": "userLoginNormal", "timestamp": timestamp, "broadAccount": "", "broadToken": "", |
| 137 | "clientType": "#11.3.0#channel50#iPhone 14 Pro Max#", "shopId": "20002", |
| 138 | "source": "110003", "sourcePassword": "Sid98s", "token": "", "userLoginName": encode_phone(phone) |
| 139 | }, |
| 140 | "content": { |
| 141 | "attach": "test", |
| 142 | "fieldData": { |
| 143 | "loginType": "4", "accountType": "", "loginAuthCipherAsymmertric": b64_rsa(login_cipher), |
| 144 | "deviceUid": rdmstr, "phoneNum": encode_phone(phone), "isChinatelecom": "0", |
| 145 | "systemVersion": "15.4.0", "authentication": encode_phone(password) |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | r = ss.post('https://appgologin.189.cn:9031/login/client/userLoginNormal', json=payload) |
| 150 | data = r.json() |
| 151 | response_data = data.get('responseData') |
| 152 | if response_data: |
| 153 | data_inner = response_data.get('data') |
| 154 | if data_inner: |
| 155 | login_result = data_inner.get('loginSuccessResult') |
| 156 | if login_result: |
| 157 | return login_result |
| 158 | print(f"登录响应: {data}") |
| 159 | return None |
| 160 | |
| 161 | def get_ticket(phone, userId, token): |
| 162 | import re |
no test coverage detected