一些字符串不在只读区段,Hex-Rays反编译器默认只打印常量字符串,变量字符串会以别名显示
操作:
Edit -> Plugins -> Hex-Rays Decompiler -> Options -> Analysis options 1
取消勾选"Print only constant string literals"
示例:
字符串所在区段如下:
默认反编译结果:
取消勾选"Print only constant string literals"后的反编译结果:
相关配置文件: cfg/hexrays.cfg
相关行:
HEXOPTIONS由HO_各种选项组合,0x831FF - 0x000040 = 0x831BF
所以HEXOPTIONS改为 0x831BF 即可
https://bbs.kanxue.com/thread-264873.htm
2023/7/14
#include <stdio.h>
char global_str[] = "hello";
int main() {
char local_str[] = "world";
printf("global_str: %s\n", global_str);
printf("local_str: %s\n", local_str);
return 0;
}
#include <stdio.h>
char global_str[] = "hello";
int main() {
char local_str[] = "world";
printf("global_str: %s\n", global_str);
printf("local_str: %s\n", local_str);
return 0;
}
int __cdecl main(int argc, const char **argv, const char **envp)
{
char v4[8];
strcpy(v4, "world");
sub_401040("global_str: %s\n", aHello);
sub_401040("local_str: %s\n", v4);
return 0;
}
int __cdecl main(int argc, const char **argv, const char **envp)
{
传播安全知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2023-12-16 21:29
被qux编辑
,原因: 补充修改配置文件的方法