在小米社区app登录时,能够取出cookie的url,提交数据内遇到一个参数clientSign登录部分
url = “https://account.xiaomi.com/pass/serviceLoginAuth2”data = “sid=miui_vip&cc=%2B86&hash=” + 到大写 (取数据摘要 (到字节集 (密码 )) ) + “&callback=https%3A%2F%2Fapi.vip.miui.com%2Fsts&qs=%253Fsid%253Dmiui_vip%2526_locale%253Dzh_CN%2526_json%253Dtrue&_locale=zh_CN&user=%2B86” + 帐号 + “&_sign=CDqnf5FflAq28e3aSTOnyHaJ%2BuM%3D&_json=true”cookie = “sdkVersion=accountsdk-2020.01.09; deviceId=an_021d512dfe84e25d739d30b596232e79”res = 编码_URL解码 (到文本 (网页_访问_对象 (url, 1, data, cookie, cookies, #常量1 )), 真)
返回值里包含一个url
{"qs":"?sid=miui_vip&_locale=zh_CN&_json=true","ssecurity":"RYx90dfnF1xh2EFmPmpFJQ==","code":0,"passToken":"V1:DXmurwq2/R1BHTELu6obCWMDJIEE2Ghjlm6TdgFwKEAXVypp8M54o9mjKIbiAHzb0LDYbRJg5MkohpwHPPLTINwUMgUlsCB4qUjI8S1AvnfkbPYg5YDI3rH6yPGHcfUWDelIsYI9Fb5MQcaaMobVuRePe8D5vdJEULkNPf7Gv3ffq64oLZfvDRXVs8nqOgDcg0Xp357yXu/lB5l0nkeq0VjnBQmU9ATKHqqNbASJ7WKtPzbOundGASjbBKhxchVgUhKH2CSgLkBe+ZvBa/wJb5YZuf/BmGkMI9RoUpTQU9I=","description":"成功","securityStatus":0,"nonce":593971125377420288,"userId":******,"cUserId":"*******,"result":"ok","psecurity":"kJpnrRalKBT2MsWYZcXR3Q==","captchaUrl":null,"location":"https://api.vip.miui.com/sts?d=an_021d512dfe84e25d739d30b596232e79&ticket=0&pwd=1&p_ts=1635866771000&fid=0&p_lm=1&auth=bStNHajcWo3ouwqYuJC5InGknyvLc+t+2ZtApyAjLInjs9TwEfzV2eurzkARm5Vt9QCV9+wOWqic1cBNz2uhNYfhCsGPkjk7PPMyQ1D/flka0wl2TmwvphMNf9Yz5vZZp3T0SrbPKsiMMP0vbRPmeXrJNaJ7ZFate5yYZqc3BoY=&m=1&tsl=0&nonce=079k8b4Ek1IBoAW+&_ssign=EUa072KUhs6wp3HzCsWsxyWghXo=","pwd":1,"desc":"成功"}
此url+“&_userIdNeedEncrypt=true&clientSign=” + clientSign即为能够获取图中右方cookie的url
图片链接
https://z3.ax1x.com/2021/11/02/IksldA.png
这个clientSign的获取,论坛也看见过小爱音箱的登录也存在一个clientSign,是”nonce=“+nonce+”&“+ssecurity通过16进制SHA1编码后得来的,ssecurity是上一个返回值中开头的ssecurity
nonce的值在返回值里有两个,在链接最后方有一个类似base64编码的值,但由于在inspecage中hash页下发现如下字段
9 Algorithm(SHA1)[nonce=5706114212898128896&JFApc9BVpc1QWI1p79cIAw== : fcf7417d3ab922aacb90269cd9bc5141b7174169]
于是确定是第一个nonce值
图片链接
https://z3.ax1x.com/2021/11/02/IkyPl8.png
但是这和clientSign的值差的太远,中间又经历了什么算法不清楚,求助各位
以下是相对应的一组值
' sscurity=sIVCY3JDJI9V506fYt5RAw==
' nonce=2045928877390349312
' 此两项对应clientSign为------clientSign=F7DqHLsQI1TrWWKunju034yFETc%3D
输出调试文本 (校验_取sha1 (到字节集 (“nonce=2045928877390349312&sIVCY3JDJI9V506fYt5RAw==”))) ' 得到的值 - > e8f334d5522d0f5fcc2b92fc3429fcb112c563b4
所以由e8f334d5522d0f5fcc2b92fc3429fcb112c563b4到F7DqHLsQI1TrWWKunju034yFETc%3D经过什么加密就找不到了,在此求助各位,感谢!
|