seirra Posted December 23, 2022 Posted December 23, 2022 What mean about this ? so=gg.getRangesList('libil2cpp.so')[2].start so=gg.getRangesList('libil2cpp.so')[1].start Idk what mean [2] and [1], can someone help me what's the difference
MAARS Posted December 23, 2022 Posted December 23, 2022 In lua we use square bracket to access table index which can be numeric or associative(string). for example: local myTable = {"hello", "world"} print ( myTable[1] ) -- hello print ( myTable[2] ) -- world So to jump back in your code gg.getRangesList return a list table with memory regions. Each element is a table with fields: state, start, end, type, name, internalName. so to explain: This return a list table with all memory regions gg.getRangesList('libil2cpp.so') this access the first index in the table gg.getRangesList('libil2cpp.so')[1] this access the start index in the first element of the list table gg.getRangesList('libil2cpp.so')[1].start memory regions have those index available as listed above: state, start, end, type, name, internalName. so to conclude, my little advice is first you need to learn lua, it is mandatory to understand such thing cause it is the core the language and you need it to do scripting with gg. You need to check the class reference this is where everything about gg class is documented. and the last one is, use the print function to see table structure, lua implementation in gg permit you to print table content without looping, which is a game changer it save you a lot of time. print ( gg.getRangesList('libil2cpp.so') ) -- print ( gg.getRangesList('libil2cpp.so')[1] ) -- print ( gg.getRangesList('libil2cpp.so')[1].start ) one at a time so you do not get lost
MC874 Posted December 23, 2022 Posted December 23, 2022 12 minutes ago, seirra said: What mean about this ? so=gg.getRangesList('libil2cpp.so')[2].start so=gg.getRangesList('libil2cpp.so')[1].start Idk what mean [2] and [1], can someone help me what's the difference Hi! [value] means order, so if it's [2], it will select the second order of libil2cpp.so. The reason is, sometimes the libs allocated in multiple Memory Ranges / Memory Region. You can see this: - 3 Libil2Cpp are listed Under XA
Question
seirra
What mean about this ?
so=gg.getRangesList('libil2cpp.so')[2].start
so=gg.getRangesList('libil2cpp.so')[1].start
Idk what mean [2] and [1], can someone help me what's the difference
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.