ks 弹幕 评论解密 分析
声明:
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
逆向分析
url = "live_api/liveroom/recall"
这个接口就是评论内容
headers = {
"Accept": "application/json, text/plain, */*",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Type": "application/json",
"Pragma": "no-cache",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0",
"sec-ch-ua": "\"Not A(Brand\";v=\"8\", \"Chromium\";v=\"132\", \"Microsoft Edge\";v=\"132\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
}
data = {
"liveStreamId": "",
"feedTypeCursorMap": {
"1": 0,
"2": 0
}
}
response = requests.post(url, headers=headers,json=data)
data = response.json().get('data')
if data:
historyFeedList = data["backTraceFeedMap"]["1"]["historyFeedList"]
for item in historyFeedList:
byte_content = c(item)
comment_feed = decrypt(byte_content)
{comment_feed.user.userName} 评论者id {comment_feed.user.principalId}")j
结果

