Jump to content
  • 0

How i can goto pointer in lua?


segamfle

Question

4 answers to this question

Recommended Posts

1 hour ago, MainC said:

Hi! Since goto pointer = goto address. Might use:

local baselib = gg.getRangesList("libUnreal.so:")[3].start
local value = {{address = baselib + 0x2561df0 + 0x0 + 0x100, flags = gg.TYPE_DWORD}}
value = gg.getValues(value)
print(value)

 

I don't think this is "go to pointer". You added + 0x100 on the original offset. Basically baselib + 0x2561EF0. In the screenshot you see that he only added this offset "baselib + 0x2561df0. Then the value on that address is a pointer which he wants to go to and add 0x100 to the new address. --( @segamfleplease correct me if wrong) so i think you have to adjust the script example @MainC

8 hours ago, segamfle said:

Hello. I need any example code for goto pointer function in lua script. 

Example:

MySelfPosition = ('libUnreal.so')[3] - > 0x2561df0 - > 0x0 -> 0x100

(P.s. " - > " it's mean go-to pointer)

Screenshot_20221129-005757.png

Screenshot_20221129-005738.png

Store the value of key ["value"] on the key ["address"] and then use gg.loadResults() or gg.getValues() Here is the concept if i use print befor and after storing value at address:

Script ended: --example using print
-- before
{ -- table(f74be5a)
	['address'] = 0x73dc0c83d8,
	['flags'] = 32, -- gg.TYPE_QWORD
	['value'] = 497613141024, -- value
}
-- after
{ -- table(f74be5a)
	['address'] = 0x73dc0df420, -- value becomes address(add 0x100)
	['flags'] = 4, -- gg.TYPE_DWORD
	['value'] = 60,
}

 

Link to comment
Share on other sites

Hi! Since goto pointer = goto address. Might use:

local baselib = gg.getRangesList("libUnreal.so:")[3].start
local value = {{address = baselib + 0x2561df0 + 0x0 + 0x100, flags = gg.TYPE_DWORD}}
value = gg.getValues(value)
print(value)

Here's some similar Issue with Answer that might Useful:

EDIT:
Thanks @Platonic for mentioning the problem, I though it was similar to CE where You can just do:( base > point > point ). Turns out it's a little bit different. Here's the Updated one with better clearance:

addr = gg.getValues({{address = gg.getRangesList("libUnreal.so:")[3].start + 0x2561df0, flags = gg.TYPE_DWORD}}) --Getting Offset Result for Base Address
print(addr) --First Query
addr[1].address = addr[1].value + 0x100 --Add Pointer here
addr = gg.getValues(addr)  --Refresh Result
print(addr) --Second Query: Changes Happen
converti2 = string.format('%08X', addr[1].address):sub(-8) --Patch Pointer Address
print(converti2) --The Literal Pointer Address
Link to comment
Share on other sites

Thanks everyone for help.

If anyone need code:

gg.setVisible(false)
local ranges = gg.getRangesList("libUnreal.so")
local libStart = ranges[3].start
local value = {{address = libStart + 0x2561df0, flags = gg.TYPE_QWORD}}
value = gg.getValues(value)
value[1].address = value[1].value + 0x0
value = gg.getValues(value)
value[1].address = value[1].value + 0x100
value = gg.getValues(value)
value[1].address = value[1].value + 0x0
value[1].flags = gg.TYPE_DOUBLE
value = gg.getValues(value) 
gg.addListItems(value)
print("Current address is: " .. string.format("%08X", value[1].address):sub(-10) ..
      " and current X coordinate position is: " .. value[1].value)

 

Link to comment
Share on other sites

16 hours ago, MainC said:

 

addr = gg.getValues({{address = gg.getRangesList("libUnreal.so:")[3].start + 0x2561df0, flags = gg.TYPE_DWORD}}) --Getting Offset Result for Base Address

 

Noticed just some thing, if you do "libUnreal.so:" you will start at the Cb memory range of that executable (if there is a part of that executable in that memory range). I believe there is either one part or no part of a executable in Cb range. So [3].start will give error as it won't exist. It will be "libUnreal.so". And [3].start will then be in Cd range like in the screenshot.

Data type is qword.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.