Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

特征码模块 #233

Draft
wants to merge 100 commits into
base: master
Choose a base branch
from
Draft

特征码模块 #233

wants to merge 100 commits into from

Conversation

fesily
Copy link
Contributor

@fesily fesily commented Mar 16, 2023

  • launcher加入配置文件
  • 特征码扫描
  • luadebug导入表修复
  • 测试

配置文件:

  • 文件路径为plugins/tmp/ipc_{pid}_config
  • json格式
{
   "version":"5.4", //强制版本号
   "module":"path", //指定哪个模块为lua
   "functions":{ // 函数的特征码
      "function_name":{
         "start_offset":0, //搜索模块的起始地址子节偏移
         "end_offset":0, // 搜索模块的结束地址子节偏移
         "pattern":"ff ?? ff", //特征码
         "pattern_offset":0, //函数相对特征码子节偏移
         "hit_offset":0 //多个特征码匹配下确定是哪个
      }
   }
}

特征码扫描
在特定地址范围内扫描特征码,hit_offset决定哪个匹配命中


luadebug导入表修复

  • macos
  • windwos

修复函数获取顺序

  1. 特征码函数
  2. 自带的lua库,这个假设待定函数没有被修改

特征码自动生成模块

扫描动态库luadebug和launch生成所需的导入表,然后自动扫描对应的lua模块生成特征码库

luadebug使用读取导入表中lua*
launcher使用扫描静态字符串中lua*的合法字符串

@actboy168
Copy link
Owner

actboy168 commented Mar 17, 2023

看起来又是一个很大的patch。我打算先做一个版本更新,然后你这里面的内容我觉得可以拆分一个功能出来。launcher读配置,配置只需要一项;然后加载调试器。

{
   "version":"5.4",
}

@fesily fesily marked this pull request as draft March 28, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants