找回密码
 register
搜索
查看: 2|回复: 0

洱海月 v0-08-0501 封包解析:ID 1215 CGReportWaigua(外挂举报)

[复制链接]
  • 打卡等级:本地老炮
  • 打卡总天数:521
  • 打卡月天数:10
  • 打卡总奖励:519
  • 最近打卡:2026-06-12 00:22:10
Waylee 发表于 2026-4-25 23:38 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×

CGReportWaigua 是当前客户端外挂举报界面使用的上行包。客户端 AccusationStudio.lua 在提交时调用 Lua_ReportWaigua(name, report_type, desc),当前 Game.exe 会把它序列化为 type == 2 的举报提交包;场景或人物菜单中的举报入口会先走 type == 1 查询目标资料,再由服务端回 GCRetReportWaigua 打开举报界面。

包信息

项目 内容
封包 ID 1215
包名 CGReportWaigua
方向 CG 客户端 -> 游戏服
对应回包 type == 1 对应 GCRetReportWaigua(79)type == 2 无专用回包
作用 查询被举报玩家资料,或提交外挂举报类型和填写内容

当前 Game.exe 可确认这条包按首字节 type 分支变长:

type == 1: 1 + 30 + 4       = 35
type == 2: 1 + 30 + 4 + 256 = 291
其他:     1 + 30           = 31

包体结构

偏移 长度 字段 类型 含义
0x00 0x01 type uint8 功能分支;1 查询目标资料,2 提交举报
0x01 0x1E name char[30] 被举报玩家名,GBK 固定槽
0x1F 0x04 guid int32 type == 1 存在;目标玩家 GUID
0x1F 0x04 report_type int32 type == 2 存在;举报类型 1..8
0x23 0x100 desc char[256] type == 2 存在;举报界面填写内容,GBK 固定槽

guidreport_type 复用同一偏移,由 type 决定解释方式。

当前实际行为

  • type == 1:当前 Lua 服务端优先按 guid.world 玩家信息,失败时按 name 查询;查到后返回 GCRetReportWaigua(79)
  • type == 2:当前 Lua 服务端校验 report_type 必须在 1..8,然后把举报记录写入 log_report_waigua
  • type == 2 的填写内容会进入 report_desc 字段,同时运行日志会打印 report_desc
  • 提交举报后客户端自己会提示举报提交成功;服务端不需要为 type == 2 再回专用确认包。

服务端落点

  • 协议定义:/home/ubuntu/Game2/services/game/packet.lua
  • 请求入口:/home/ubuntu/Game2/services/msgagent.lua
  • 查询目标资料:.worldget_player_info / get_player_info_by_name
  • 举报日志集合:log_report_waigua

关键代码

当前 Lua 包体解析:

packet.CGReportWaigua = {
    xy_id = packet.XYID_CG_REPORT_WAIGUA,
    bis = function(self, buffer)
        local stream = bistream.new()
        stream:attach(buffer)
        self.type = stream:readuchar()
        self.name = packet_read_gbk_string(stream, 0x1E):gsub("%z+$", "")
        if self.type == 1 then
            self.guid = stream:readint()
        elseif self.type == 2 then
            self.report_type = stream:readint()
            self.desc = packet_read_gbk_string(stream, 0x100):gsub("%z+$", "")
        end
    end
}

当前 Lua 提交落库:

local doc = {
    fun_name = "CGReportWaigua",
    reporter_name = ma_func:get_name(),
    reporter_guid = ma_func:get_guid(),
    target_name = self.name or "",
    target_guid = (target_info and target_info.guid) or self.guid or 0,
    target_level = target_info and target_info.level or 0,
    target_menpai = target_info and target_info.menpai or 0,
    report_type = report_type,
    report_desc = self.desc or "",
    date_time = utils.get_day_time(),
}
skynet.send(".logdb", "lua", "insert", { collection = "log_report_waigua", doc = doc })

结论

  1. CGReportWaigua(1215) 是外挂举报界面的主包,type == 1 用于打开界面前查询目标资料,type == 2 用于提交举报。
  2. 当前服务端已经完整解析 type == 2report_typedesc[256],填写内容会保存到 log_report_waigua.report_desc
  3. 聊天界面的右键投诉不走这条包,而是走 CGDisclosureToGM(171),两条举报链路需要分开看。
您需要登录后才可以回帖 登录 | register

本版积分规则

QQ|雪舞知识库 ( 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 )|天天打卡

GMT+8, 2026-6-12 03:23 , Processed in 0.050966 second(s), 25 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表