kotori2/riru_unity_example

how to get char array value from std::string

Opened this issue · 5 comments

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);

use cSharpString* fileName as param, and print fileName->buf
data in Il2cpp world is not using STL class

is this cSharpString struct got from ida ?

May I ask how did you dump it from memory ? what tools are used ?
gdb ? ida script ?

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));