JS逆向案例-web某音弹幕protobuf逆向解析

一、案例分析

  • 如图弹幕信息,弹幕信息是protobuf序列化后的数据
    在这里插入图片描述
    在这里插入图片描述
  • 响应头也有明显特征:content-type: application/protobuffer
    在这里插入图片描述

二、案例解析

  • 关于protobuf案例的更详细介绍看这篇文章
  • 这里直接安装pip install blackboxprotobuf,先用fiddler抓包,然后选择响应当中的十六进制字节黑色字体右击存为.bin文件,然后按如下脚本解析
    在这里插入图片描述
    在这里插入图片描述
  • 如果是响应请求的话,就按如下脚本解析即可
    import requests
    import blackboxprotobuf
    response = requests.get("", headers={
          
          }, timeout=10)
    deserialize_data, message_type = blackboxprotobuf.protobuf_to_json(response.content)
    print(f"原始数据: {
            
            deserialize_data}")
    print(f"消息类型: {
            
            message_type}") 
    
  • 相关文章推荐:文章1文章2文章3

猜你喜欢

转载自blog.csdn.net/weixin_43411585/article/details/123160733