-
Notifications
You must be signed in to change notification settings - Fork 10
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
Generate all command api functions using json with hierarchical command types and handle the respective arguments #169
Comments
Hi, 嗨, |
不,只是想将他们分类,就像您的源代码目录中那样
…---Original---
From: "Sina ***@***.***>
Date: Sun, Jul 7, 2024 16:32 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [HyperDbg/gui] Generate all command api functions using json withhierarchical command types and handle the respective arguments (Issue #169)
Hi,
I'm here now. Are you going to make a parser for the commands in GO? Am right? or do you just want to show them in a list?
嗨,
我现在就在这里。你要为 GO 中的命令制作一个解析器吗?对吧?还是你只是想将它们显示在列表中?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Ah, I got what you mean. Honestly, this is really hard to make because I created this JSON file manually. Unfortunately, we don't have a separate parser for the commands in libhyperdbg and it's been on the to-do list for a long time, so right now each command doesn't have structured arguments and parameters format, and making such a structure for commands probably needs months of work! I suggest not to use a unique function for each command. Instead, we could create a box and pass all of the user inputs to the ' What do you think of it? 啊,我明白你的意思了。老实说,这真的很难做,因为我手动创建了这个 JSON 文件。不幸的是,我们没有 libhyperdbg 中命令的单独解析器,而且它已经在待办事项列表中很长时间了,所以现在每个命令都没有结构化的参数和参数格式,而为命令创建这样的结构可能需要几个月的工作! 我建议不要为每个命令使用一个唯一的函数。相反,我们可以创建一个框并将所有用户输入传递给“解释器”函数。我开始逐步导出 SDK 中的所有命令(目前,我正在努力导出读取/写入内存等基本功能,现在,我正在努力为您提供对寄存器的读取/写入)。我认为在 SDK 中导出功能比将它们传递给“解释器”函数更好,因为这样我们可以删除解释阶段并使其更快。 你觉得怎么样? |
我觉得我们应该保持现状,因为那样会增加工作量,意思就是命令解析和检查保持让libhyperdbg继续解析。然而,在ui交互的时候,去脑海中拼接每个命令函数的参数个数和类型等等这有点难以记忆,所以我的做法是命令函数的参数个数,类型还是要写进json,然后我把他们封装在调用每个命令的形参位置,这样调用命令函数的时候相当于它有静态语法检查我是否误传了参数,在调用命令函数之前我会通过参数类型将所有参数格式化为完整命令,其余的检查事宜仍然由dll完成。
…---Original---
From: "Sina ***@***.***>
Date: Sun, Jul 7, 2024 18:08 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [HyperDbg/gui] Generate all command api functions using json withhierarchical command types and handle the respective arguments (Issue #169)
Ah, I got what you mean. Honestly, this is really hard to make because I created this JSON file manually. Unfortunately, we don't have a separate parser for the commands in libhyperdbg and it's been on the to-do list for a long time, so right now each command doesn't have structured arguments and parameters format, and making such a structure for commands probably needs months of work!
I suggest not to use a unique function for each command. Instead, we could create a box and pass all of the user inputs to the 'interpreter' function. I started to export all of the commands in the SDK gradually (for now, I'm working on exporting essential functionalities like reading/writing memory, and right now, I'm working on providing read/write into registers for you). I think having functionalities exported in the SDK is better than passing them to the 'interpreter' functions since this way we could remove the interpreting phase and make it faster.
What do you think of it?
啊,我明白你的意思了。老实说,这真的很难做,因为我手动创建了这个 JSON 文件。不幸的是,我们没有 libhyperdbg 中命令的单独解析器,而且它已经在待办事项列表中很长时间了,所以现在每个命令都没有结构化的参数和参数格式,而为命令创建这样的结构可能需要几个月的工作!
我建议不要为每个命令使用一个唯一的函数。相反,我们可以创建一个框并将所有用户输入传递给“解释器”函数。我开始逐步导出 SDK 中的所有命令(目前,我正在努力导出读取/写入内存等基本功能,现在,我正在努力为您提供对寄存器的读取/写入)。我认为在 SDK 中导出功能比将它们传递给“解释器”函数更好,因为这样我们可以删除解释阶段并使其更快。
你觉得怎么样?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I think we should leave it as it is because that would increase the workload, meaning that the command parsing and checking stays for libhyperdbg to continue parsing. However, when interacting with the ui, it's a bit hard to remember the number and type of arguments for each command function, so what I've done is to write the number and type of arguments for the command function into the json, and then I've encapsulated them in the formal parameter of the call to each command, so that when calling the command function, it's equivalent to having a static syntax to check that I haven't passed the arguments by mistake, and I'll format all the arguments into the full command by their type before calling the command function.Before calling the command function, I will format all the parameters into full commands by parameter type and pass them to the dll, the rest of the checking is still done by the dll. |
okay, so anything else you need on my side? Right now, I'm working on providing the SDK APIs for the reading/writing registers. It's available here (https://github.com/HyperDbg/HyperDbg/tree/register-api), but it's not done yet. I need to make a comprehensive test to see if it works or not. I'll let you know once it's ready. 好的,您还需要我提供什么吗?目前,我正在努力提供用于读取/写入寄存器的 SDK API。它可在此处获得(https://github.com/HyperDbg/HyperDbg/tree/register-api),但尚未完成。我需要进行全面测试以查看它是否有效。一旦准备好,我会通知您。 |
json需要更改,我在之前的图片和gif中说明了怎么改了
…---Original---
From: "Sina ***@***.***>
Date: Sun, Jul 7, 2024 18:53 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [HyperDbg/gui] Generate all command api functions using json withhierarchical command types and handle the respective arguments (Issue #169)
okay, so anything else you need on my side? Right now, I'm working on providing the SDK APIs for the reading/writing registers. It's available here (https://github.com/HyperDbg/HyperDbg/tree/register-api), but it's not done yet. I need to make a comprehensive test to see if it works or not. I'll let you know once it's ready.
好的,您还需要我提供什么吗?目前,我正在努力提供用于读取/写入寄存器的 SDK API。它可在此处获得(https://github.com/HyperDbg/HyperDbg/tree/register-api),但尚未完成。我需要进行全面测试以查看它是否有效。一旦准备好,我会通知您。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
ok |
I send you an updated version of the JSON (in email). We don't have such a thing as arguments separately in HyperDbg since it's not standard available in HyperDbg so other than the arguments, I think other issues are fixed. 我会向您发送 JSON 的更新版本(通过电子邮件)。HyperDbg 中没有单独的参数,因为它不是 HyperDbg 中的标准配置,因此除了参数之外,我认为其他问题都已修复。 |
好的
…---Original---
From: "Sina ***@***.***>
Date: Sun, Jul 7, 2024 19:30 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [HyperDbg/gui] Generate all command api functions using json withhierarchical command types and handle the respective arguments (Issue #169)
I send you an updated version of the JSON (in email). We don't have such a thing as arguments separately in HyperDbg since it's not standard available in HyperDbg so other than the arguments, I think other issues are fixed.
我会向您发送 JSON 的更新版本(通过电子邮件)。HyperDbg 中没有单独的参数,因为它不是 HyperDbg 中的标准配置,因此除了参数之外,我认为其他问题都已修复。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
我正在优化编译后的文件大小,这可能需要很久,因为要重构底层的ui库,不知道会不会成功
#167
…---Original---
From: "Sina ***@***.***>
Date: Sun, Jul 7, 2024 19:30 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [HyperDbg/gui] Generate all command api functions using json withhierarchical command types and handle the respective arguments (Issue #169)
I send you an updated version of the JSON (in email). We don't have such a thing as arguments separately in HyperDbg since it's not standard available in HyperDbg so other than the arguments, I think other issues are fixed.
我会向您发送 JSON 的更新版本(通过电子邮件)。HyperDbg 中没有单独的参数,因为它不是 HyperDbg 中的标准配置,因此除了参数之外,我认为其他问题都已修复。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This will parse the json with the longest example field too extract all the parameters and types, ideally like the current sdk's set breakpoint api function looks like, with all the parameters and types. This would make it easier to interact with ui widget events, as parsing the command return would require a temporary constructed structure? Some commands should not return anything at all, the execution structure and return value are not visible?
https://github.com/HyperDbg/gui/blob/main/sdk%2Fcc%2Fcommand_test.go#L44-L85
The text was updated successfully, but these errors were encountered: