how to get char array value from std::string
Opened this issue · 5 comments
Deleted user commented
I have hooked a function,which takes one filename param of string type, how do I print out the string char array value of it ?
this is on android arm .
void (*setbackgroundimage)(void *lay, const std::string& fileName, int);
kotori2 commented
use cSharpString* fileName
as param, and print fileName->buf
data in Il2cpp world is not using STL class
Deleted user commented
is this cSharpString struct got from ida ?
kotori2 commented
No. That's from memory dump.
oxpy <notifications@github.com> 于 2020年5月27日周三 21:25写道:
… is this cSharpString struct got from ida ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEGYNSK3E2BXVVPUIP7STT3RTUIFTANCNFSM4NLZSDMQ>
.
Deleted user commented
May I ask how did you dump it from memory ? what tools are used ?
gdb ? ida script ?
kotori2 commented
bRuH, you already injected into the game, what can stop you from dumping memory?
e.g.:
char* ptr = 0x7f1234abcd;
for(int i=0; i < 16; i++) LOGI("dump: %c", *(ptr+i));