【发布时间】:2021-10-31 03:22:57
【问题描述】:
我目前正在对定期更新的多人游戏进行逆向工程。网络协议使用自定义序列化框架,我现在能够恢复有关正在交换的消息的大量信息。对于每条消息,我可以检索所述消息的完整结构和该消息的类型(例如,身份验证、聊天、移动......)。但是,我遇到的一个问题是消息和消息类型会定期添加和删除,并且消息可能会添加或删除字段。 消息和消息类型的整体顺序保持不变!
我现在正在寻找一种如何最好地利用我必须将更新的消息结构与我已经确定了一些消息和字段的含义的旧消息结构相匹配的信息的方法。也就是说,给定如下两组消息,我如何传输已经逆向工程的信息(新消息中的 cmets)?
旧消息:
Authentication:
message Login:
opcode: 1
fields:
- string mail
- string password
message LoginResponse:
opcode: 2
fields:
- string token
Chat:
message ChatSend:
opcode: 3
fields:
- string channel
- string message
message ChatReceive:
opcode: 4
fields:
- string channel
- string user
- string message
新消息:
Type1: # Authentication
message Unk1: # Login
opcode: 1
fields:
- string unk1 # mail
- string unk2 # password
_ string unk3 # new field
message Unk2: # LoginResponse
opcode: 2
fields:
- string unk1 # token
Type2: # new Type
message Unk3:
opcode: 3
fields:
- Vec3 unk1
- float unk2
Type3: # Chat
message Unk4: # ChatSend
opcode: 4
fields:
- string unk1 # channel
- string unk2 # message
message Unk5: # new message
opcode: 5
fields:
- string unk1
- string unk2
message Unk6: # ChatReceive
opcode: 6
fields:
- string unk1 # channel
- string unk2 # user
- string unk3 # message
一些附加信息:大约有 60 种不同类型的消息,每种消息类型最多有大约 100 条消息。我也欢迎使用伪代码或 python 的解决方案。
【问题讨论】:
-
这是什么游戏?
标签: python reverse-engineering sequence-alignment