我正在使用 Ghidra。我有个问题。当我打开二进制 IDA pro 时,代码非常好分析。这是 IDA pro 反编译代码
printf("Tell me something about yourself: ");
fgets(&s, 32, edata);
std::string::operator=(&input, &s);
std::allocator<char>::allocator(&v5);
std::string::string((int)&v4, (int)"you", (int)&v5);
std::allocator<char>::allocator(&v7);
std::string::string((int)&v6, (int)"I", (int)&v7);
replace((std::string *)&v3);
这是 Ghidra 相同的部分。
printf("Tell me something about yourself: ");
fgets(local_40,0x20,stdin);
operator=((basic_string<char,std--char_traits<char>,std--allocator<char>> *)&input,local_40);
allocator();
basic_string((char *)local_1c,(allocator *)&DAT_08049823);
allocator();
basic_string((char *)local_14,(allocator *)&DAT_08049827);
replace(local_20,&input,local_14,local_1c);
operator=((basic_string<char,std--char_traits<char>,std--allocator<char>> *)&input,
(basic_string *)local_20);
问题是当我用 IDA Pro 打开二进制文件时,他们可以显示字符串。喜欢
std::string::string((int)&v4, (int)"you", (int)&v5);
std::string::string((int)&v6, (int)"I", (int)&v7);
但在吉德拉
basic_string((char *)local_1c,(allocator *)&DAT_08049823);
allocator();
basic_string((char *)local_14,(allocator *)&DAT_08049827);
我只想知道如何更改 ghidra 中的配置。像这样
local_1c -> "you" , local_14 -> "I"