**版米游社`salt`
MoRanYue opened this issue · comments
可用的salt
需要在验证请求头的API的生成DS
请求头字段值时使用合适的salt
点击查看K2与LK2的具体数据
米游社版本 | K2 | LK2 |
---|---|---|
2.71.1 | rtvTthKxEyreVXQCnhluFgLXPOFKPHlA | EJncUPGnOHajenjLhBOsdpwEMZmiCmQX |
2.70.1 | S9Hrn38d2b55PamfIR9BNA3Tx9sQTOem | sjdNFJB7XxyDWGIAk0eTV8AOCfMJmyEo |
2.69.1 | 9XXf7BHajk1jwo3JAYncLjbYQizFEfoo | ZPDcG5oaYUGWVcrImzWLzBLYOX9LpYd7 |
2.68.1 | NjqtetBQOv7BxuOmK0vxzBDQfDXwDoJR | NxZo0qhBAkihjgnEBXfrMX05Vy3wjFOf |
2.67.1 | yajbb9O8TgQYOW7JVZYfUJhXN7mAeZPE | LyD1rXqMv2GJhnwdvCBjFOKGiKuLY3aO |
2.66.1 | Za8pSfshqZn9URWnG2UoIA6X978y5lIK | FpvXUfEzlyMLY5pgg4yG6M92FifzJXHB |
2.65.2 | hEpLz8rXmJkFvEgM621GRwBFUr9T7pC4 | hH4miWJ83aMRC03dryo17npXu2OiosxX |
2.64.1 | rZCiGk2USBdVOfL89paeIo3ajfN8fT75 | 2zK0Rii2oMD1p56hXbzQfkQPbGzho53k |
2.63.1 | BIPaooxbWZW02fGHZL1If26mYCljPgst | 9ttJY72HxbjwWRNHJvn0n2AYue47nYsK |
2.62.2 | pIlzNr5SAZhdnFW8ZxauW8UlxRdZc45r | 0wr0OpH2BNuekYrfeRwkiDdshvt10cTY |
2.61.1 | uTUzziiV9FazyGA7XgVIk287ZczinFRV | L6ht0P18usSaC9c5Do3olmygiR4QX389 |
2.60.1 | AcpNVhfh0oedCobdCyFV8EE1jMOVDy9q | 1OJyMNCqFlstEQqqMOv0rKCIdTOoJhNt |
2.59.1 | awFeNNTsLYcK20LSO60Es8CRVZOjCB1b | 6pNd5NnDnbwKxewrPwEoWlSYwhualS2H |
2.58.2 | kzTvKGDHumYf6h1Ia5txMjxAJuTtD0ol | KTJQGN2a2Trqk0tcQZS6JV3rU7CnV8Q6 |
2.57.1 | 1XgQyjgs3iGBwEwgnqySnqtPdw0Yi2mP | 20k4lPpyult9CEZ2dhoEkV09lkt0Rqes |
2.56.1 | 4boKU9HR49XublAiGdlH6xCpjAnaix3X | wam87VdmOXIGINFFSChd4D5idFx9KGiY |
2.55.1 | xc1lzZFOBGU0lz8ZkPgcrWZArZzEVMbA | F6tsiCZEIcL9Mor64OXVJEKRRQ6BpOZa |
2.54.1 | HwppTvPwIAKGTG7DhnwQRHhQ1LP3oR3S | 6opzJn4gevA62u3g6arFwLKu8Hvq9kdP |
2.54.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.53.1 | yuzHvf4MkGYyoS4837hHOwLMyVOmtPuY | 0PUWkNIBnLcg8GgRNRJc14kSn4SrPBsS |
2.53.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.52.1 | HiwYTTu2ovGcU51ehSXfe22SpNmQumlT | QCRgj6bHHQvS0Rz03loexYSXpuiO3DZ6 |
2.52.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.51.1 | OFYrOudMZI78JBshNtCipA12GLQ4smLZ | 8eow43oFDpZeLfsSlpYVdtO6cbPN9yAu |
2.51.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.50.1 | A4lPYtN0KGRVwE5M5Fm0DqQiC5VVMVM3 | kkFiNdhyHqZ1VnDRHnU1podIvO4eiHcs |
2.50.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.49.1 | egBrFMO1BPBG0UX5XOuuwMRLZKwTVKRV | DG8lqMyc9gquwAUFc7zBS62ijQRX9XF7 |
2.49.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.48.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.47.1 | OYcKGMRDRpnluotQHWwPDnV4xZG4WRMx | 9YiFQ07upss6RVY7bwrUe3Hly9pktOr4 |
2.47.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.46.1 | KZazpG4cO2QECFDBUCxdhS8cYCsQHfzn | X7UOLLnTuNS3kgTJ1BUHOvKpiqp3kmym |
2.46.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.45.1 | Ea0hkTHxe9cJDwlw4hswBGHDfSlmM5t9 | J1ylcAXhqus0YkEOEqeYDia4ldrd1Wvg |
2.45.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.44.1 | dZAwGk4e9aC0MXXItkwnHamjA1x30IYw | IEIZiKYaput2OCKQprNuGsog1NZc1FkS |
2.44.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.43.1 | ODzG1Jrn6zebX19VRmaJwjFI2CDvBUGq | V1PYbXKQY7ysdx3MNCcNbsE1LtY2QZpW |
2.43.1 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.42.1 | jrU9ULHGZdM9Os3uGHOpjyRELYxby5cg | 9gaxOdeeY2W9dw5x62pywhik8cxy5TIJ |
2.42.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.41.1 | TsmyHpZg8gFAVKTtlPaL6YwMldzxZJxQ | osgT0DljLarYxgebPPHJFjdaxPfoiHGt |
2.41.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.40.1 | fdv0fY9My9eA7MR0NpjGP9RjueFvjUSQ | jEpJb9rRARU2rXDA9qYbZ3selxkuct9a |
2.40.1 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.39.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.38.1 | PVeGWIZACpxXZ1ibMVJPi9inCY4Nd4y2 | yUZ3s0Sna1IrSNfk29Vo6vRapdOyqyhB |
2.38.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.37.1 | 6J1hde1Wu02eF1DFlLpMjeg2dMloAytL | Qqx8cyv7kuyD8fTw11SmvXSFHp7iZD29 |
2.37.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.36.1 | n0KjuIrKgLHh08LWSCYP0WXlVXaYvV64 | YVEIkzDFNHLeKXLxzqCA9TzxCpWwbIbk |
2.36.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.35.1 | ZSHlXeQUBis52qD1kEgKt5lUYed4b7Bb | N50pqm7FSy2AkFz2B3TqtuZMJ5TOl3Ep |
2.35.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.34.1 | z8DRIUjNDT7IT5IZXvrUAxyupA1peND9 | 9nQiU3AV0rJSIBWgdynfoGMGKaklfbM7 |
2.34.0 | 599uqkwc0dlqu3h6epzjzfhgyyrd44ae | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.33.1 | 6aupac9Brl9ngY6zTbW4R6qhFU4ieorq | DrOURud7SJPhMq7QFGessqlP0W1H1Zde |
2.32.1 | TMZzKzTLKsdoHlg9HclqPVfswKPkVc3K | tUjkz3RmgcqT3wn3EWVRypzw55JNOcqw |
2.31.1 | vf6vnwHNA28XvTVEG2quR7Jb1nDRshIp | dzwqtbBBhnRsaaR74BrqgUo9wnGj192Y |
2.30.1 | pOdIuWYDJpUE8XywWIvJmqZ3MbQMIcly | 8FvNSgrYbNmKA7it3x3PXM1UHt5k5QLD |
2.29.1 | fvdsy1uvjh2nH7pbRhsR3EehBmfKM07f | N5SE5zP9dKlde9doDgnoy0smOneHEDBE |
2.28.1 | dWCcD2FsOUXEstC5f9xubswZxEeoBOTc | ulInCDohgEs557j0VsPDYnQaaz6KJcv5 |
2.27.1 | 5egHWuxthS2A3y5cLAs5mFNxZ1Vq47Xm | zWUvmGfuUDYtlyJixZKo4TNGkyy2eKdE |
2.26.1 | x5SqmUKVTOXQm0atFFgzaPnuukoR3kRR | B82TrmbdFM1egQyX6nLLoMxHq0bv8o2i |
2.25.1 | 51kF1mSQqrudUeG2bmOpfN1Zyi0w7kup | 7vUrKhuTsGFhGFNRuEiFqDn08JqUoZjC |
2.24.1 | 2vQN5HYZQjaMBsBURP2TEiQE2pWxmYBT | qEla7MX4OncDWcZ5LIYNh3ZlBVTxvVzE |
2.23.1 | PRMloet7okK3GkDE9NUugVI9Uwqg772U | MuS3jRY8gGBj3POP0oHls3rd2pICh8Dg |
2.22.1 | Xs13CXZSoSJiSyNqI7OueXHoYFW9nd7J | x3zQtF0dT4VqRDhgghCtTMXM6FSZSaAk |
2.21.1 | WEZMArnp99q0ILEKBhjSmATg6WstvnsL | ImmsH7Ucl9yUnGFRjbiPPrY1p8Ph626m |
2.20.1 | O7NuQxRWQLeDlx3ydb7g0ePHqnuCqUYu | 78vFtRwwxhokqXggjHykueJg1Fb3OA01 |
2.19.1 | zs1ckRtbocPtV5em1KvhQ3lohiUIvdRC | wCN9yMxmW1shLBMGSxPXRTcwpVavUYZx |
2.18.1 | qgBAyoUemRSdTyG0cKCURW09K3mkfftA | RYarginIzdoujH2WnEtL65isWpVZ5V9N |
2.17.1 | plKuQubSC47mKGRNQbvHT2JGV5Bv7jtO | 3sOJyHWiJpymE0hW2b6OUQQrLq7G0c5c |
2.16.1 | iKN9RtYfW8sIimkfpLblSoDp4HvtMJB7 | eOqOpOPvcRPPDt1PSdoaNRM78RJ3e8Tk |
2.15.1 | lGdUqAcvDgJNSKT3g8VNojvusFJnmWFB | amtw04Bbfi2Uvo9u3THErtpNOZST3h0u |
2.14.1 | KpynUoRqKicWDCw5ZmFbHgcBIsjzE5np | vTAcBCLSIOCfGxXLWhhj9k4ksvGQepQ9 |
2.13.1 | 6zT9berkIjLBimVKLeQiyYCN0tatGDpP | R621k3PJicyCn77wXTSGszb3U8zkBQA |
2.12.1 | I4Yzj5EHZIVcEX6nYd1L3tdNqe3F0Xkc | 48MMWHcOuxdqKSmb8OeMyiw5xdCHd1C |
2.11.1 | SrPve82idlmfrcRQqtMnhwKbdHJGGxMk | WwkfRfjpaJIrbQQQlGOvfh31yHJeHV6 |
2.10.1 | rd62nc33ngxzyuvlhcql3dqfaksdota8 | 4a8knnbk5pbjqsrudp3dq484m9axoc5g |
2.9.1 | 4q04st7bwy45c71az4yusak43n7en8wp | w5k9n3aqhoaovgw25l373ee18nsazydo |
2.8.1 | dmq2p7ka6nsu0d3ev6nex4k1ndzrnfiy | rk4xg2hakoi26nljpr099fv9fck1ah10 |
2.7.1 | fd3ykrh7o1j54g581upo1tvpam0dsgtf | 14bmu1mz0yuljprsfgpvjh3ju2ni468r |
2.6.1 | hfiki8qvnuai95p2845psdo9ydcmsrc0 | w9p2p72p9octwd7lj1oa913hncq1k4td |
不建议使用低于米游社最新版本10个版本号的 salt
4X | 6X | PROD |
---|---|---|
xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs | t0qEgfub6cvueAPgR5m9aQWWVciEer7v | JwYDpKvLj6MrMqqYU6jTKF17KNO2PXoS |
安全性API的RSA公钥:
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDvekdPMHN3AYhm/vktJT+YJr7
cI5DcsNKqdsx5DZX0gDuWFuIjzdwButrIYPNmRJ1G8ybDIF7oDW2eEpm5sMbL9zs
9ExXCdvqrn51qELbqj0XxtMTIpaCHFSI50PfPpTFV9Xt/hmyVwokoOXFlAEgCn+Q
CgGs52bFoYMtyi+xEQIDAQAB
-----END PUBLIC KEY-----
应该使用哪个salt
取决于你想在请求头的x-rpc-app_version
中的米游社版本,每个版本有其对应的K2salt
和LK2salt
。但是4Xsalt
和6Xsalt
是每个版本都不变的。
也取决于请求头的x-rpc-client_type
:
- 当
x-rpc-client_type
为2
时,一般使用K2salt
,并配合DS1
生成算法。 - 当
x-rpc-client_type
为4
时,一般使用LK2salt
,并配合DS1
生成算法。 - 当
x-rpc-client_type
为5
时,一般使用4X或6Xsalt
,并配合DS2
生成算法。
x-rpc-client_type
的值会在需要验证请求头的API进行标识。
如果某个API需要独有的salt
、DS
算法等,会进行标识。
用例:
- K2和LK2通常用于米游社内的操作。
- 4X通常用于查询游戏账号信息(如
api-takumi-record.mihoyo.com
的API使用较多)。 - 6X使用较少,用于签到福利。
- PROD主要用于账号相关的
salt
位置
由于某些政策,我们移除了此内容。
Due to certain policy, we removed this content.
DS
生成算法的位置
注:下文简称“DS
算法”。
由于某些政策,我们移除了此内容。
Due to certain policy, we removed this content.
为了好康,就关闭这个Issue了。
可以在固定Issue上找到。
现在米游社更新到2.51.1了
现在米游社更新到2.51.1了
这倒没事,哪个版本不重要。只需要请求头x-rpc-app_version
配合其版本对应的salt
来生成DS
便可。
x-rpc-client_type为1要怎么弄呢?
x-rpc-client_type为1要怎么弄呢?
emm,这是什么API呀?
米游社ios客户端抓包,看到header中的x-rpc-client_type都是1
用4x的salt配合DS2算法生成的DS请求还是报错invalid request
,还有啥需要注意的么?
用4x的salt配合DS2算法生成的DS请求还是报错
invalid request
,还有啥需要注意的么?
emm,将x-rpc-client_type
的值设为5
嘛
都试了还是不行
都试了还是不行
API的URL是什么呀?
所有的salt
都试过了嘛?
https://api-takumi-record.mihoyo.com/game_record/card/api/getGameRecordCard?uid=xxxx
这个接口,还有个uid参数
def get_ds():
salt = "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs"
t = 1703331929
r = "wd7tTm" # 任意六位随机字符
ds_str = f"salt={salt}&t={t}&r={r}&b=&q=uid=xxxx"
ds = hashlib.md5(ds_str.encode(encoding='UTF-8')).hexdigest()
return f"{t},{r},{ds}"
https://api-takumi-record.mihoyo.com/game_record/card/api/getGameRecordCard?uid=xxxx
这个接口,还有个uid参数def get_ds(): salt = "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs" t = 1703331929 r = "wd7tTm" # 任意六位随机字符 ds_str = f"salt={salt}&t={t}&r={r}&b=&q=uid=xxxx" ds = hashlib.md5(ds_str.encode(encoding='UTF-8')).hexdigest() return f"{t},{r},{ds}"
a,抱歉,弄错了呀。
根据文档,这个API应该这样使用呀。