app jwt票据(x-bilibili-ticket)逻辑 #1409
limbotheevil
started this conversation in
General
Replies: 1 comment 1 reply
-
|
不是已经扒过了么, #940, fp_local 也是, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
简述:
1、地址:https://grpc.biliapi.net/bilibili.api.ticket.v1.Ticket/GetTicket
2、头
accept: /
accept-encoding: gzip, deflate, br
buvid:
content-type: application/grpc
grpc-accept-encoding: identity, deflate, gzip
grpc-encoding: gzip
grpc-timeout: 18S
ignet_grpc_annotation_id: 4
te: trailers ->不清楚
user-agent: grpc-c++/1.66.2 Dalvik/2.1.0 (Linux; U; Android 14; Pixel 9 Build/AD1A.240530.030) 8.63.0 os/android model/Pixel 9 mobi_app/android build/8630300 channel/bili innerVer/8630310 osVer/14 network/2 grpc-java-ignet/1.36.1 grpc-c/43.0.0 (android; ignet_http) ->除了常规ua,还有其他的东西
x-bili-device-bin: (应该是简略的设备信息hex)
x-bili-fawkes-req-bin: 不清楚
x-bili-locale-bin: 好像是网络的local 二进制hex
x-bili-metadata-bin: 好像probuf定义二进制hex
x-bili-metadata-ip-region: CN
x-bili-network-bin: 好像是网络质量hex
x-bili-restriction-bin: 不清楚
x-bili-trace-id: 不清楚,推测是行为追踪
3、请求体
是probuf,表现形式是
1.
-1.x-fingerprint
2.上面的具体值
1-125个值(共125)具体见下面表格
-1.x-exbadbasket 不清楚,一直没东西
2.{}
2. ec01 固定值,估计每个版本会变
3.!binary sign值(hmac_sha256)
然后今天主要的重点就是这个3是怎么算的,直接贴代码
它有一个hmac的key,每个版本可能不一样,目前抓出来是这个代码里面的值,然后重点是传入的参数,他是2里面125指纹要素probuf binary后hex进去计算
也就是整体流程是
probuf -> bin -> hex -> alg -> sign
然后去和服务器兑换票据
第一次请求是不带票据的
后续都会带换回来的票据
指纹要素
Beta Was this translation helpful? Give feedback.
All reactions