-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 修复 w_rid 计算漏洞 #301
fix: 修复 w_rid 计算漏洞 #301
Conversation
还有 mixin_key 可能出现的下标越界
测试过了,这样生成的w_rid是对的。有的函数之前写的时候省略了参数,理论上全部都要改,唉,好大的工作量
考虑写一个根据库中 data 里 json 自动转 python 函数的脚本。 |
只要 wts 和 wrid 就行了,我记得 只是加个排序而已? |
不用改参数吧 |
只要加个 sorted 就可以了吧? |
例如 params = {"mid": self.__uid}
# 计算结果 {'mid': 434334701, 'wts': 1684894570, 'w_rid': 'd497848c7609eed670d61714b56c853f'} 修改后 params = {
"mid": self.__uid,
"token": "",
"platform": "web",
"web_location": 1550101
}
# 计算结果 {'mid': 434334701, 'token': '', 'platform': 'web', 'web_location': 1550101, 'wts': 1684894733, 'w_rid': 'c280cbb87d48901aefa026d5257830c6'} |
我的意思是不需要token也可以,你试过了吗?我上周试过... |
原因是 w_rid 不正确时访问接口概率成功,因为你写了那个 -403 重试才看上去不需要token也可以。实际上会发现成功获取数据前 |
这...那你测试没问题就行,我没法验证.jpg |
难说,只能保证按照原参数传能获得一样的 减少参数获得的 |
我试过增加不存在的参数计算得到的 |
SocialSisterYi/bilibili-API-collect#631 (comment) 不管咋说我合并了,得排序,不用急着去加token参数 |
是不是所有函数参数都要重写啊晕了