Jump to content
  • 0

pointer search bug


derbeyonder
 Share

Question

script code:
local results = gg.getResults(gg.getResultsCount())
for i,v in ipairs(results) do
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(v.address - 0x0, gg.TYPE_DWORD)
end

log file:

gg.getResultsCount()
gg.getResults(6)
--[[ count: 6 ]]
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(1666332864, gg.TYPE_DWORD)
--[[ found: 0 ]]
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(1666333760, gg.TYPE_DWORD)
--[[ found: 1 ]]
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(2085230528, gg.TYPE_DWORD)
--[[ found: 0 ]]
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(2090407328, gg.TYPE_DWORD)
--[[ found: 2 ]]
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(2123701312, gg.TYPE_DWORD)
--[[ found: 0 ]]
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber(2195650848, gg.TYPE_DWORD)
--[[ found: 1 ]]

when i run the script only the 2nd, 4th and 6th results are searched. but in the log file all 6 results are shown as searched.

pointer.jpg

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0



local results = gg.getResults(gg.getResultsCount())
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchPointer(0)
local results_pointers = gg.getResults(gg.getResultsCount()) -- this will have the all the pointers of all the searched values.





--[[ Note: 
gg.searchPointer()
		mixed searchPointer	(	int 	maxOffset,
		long 	memoryFrom = 0,
		long 	memoryTo = -1,
		long 	limit = 0 
		)	
	
Searches for values that may be pointers to elements of the current search result.

Parameters
	maxOffset	Maximum offset for pointers. Valid values: 0 - 65535.
	memoryFrom	Start memory address for the search.
	memoryTo	End memory address for the search.
	limit	Stopping the search after finding the specified number of results. 0 means to search all results.

**Returns**

	true or string with error.


Examples:
	gg.searchNumber('10', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 5) -- search some values
	gg.searchPointer(512) -- search for possible pointers to values finded before
	gg.searchNumber('10', gg.TYPE_DWORD) -- search some values
	gg.loadResults(gg.getResults(5))
	gg.searchPointer(512) -- search for possible pointers to values loaded before
	local t = {}
	t[1] = {}
	t[1].address = 0x18004030 -- some desired address
	t[1].flags = gg.TYPE_DWORD
	t[2] = {}
	t[2].address = 0x18004040 -- another desired address
	t[2].flags = gg.TYPE_BYTE
	gg.loadResults(t)
	gg.searchPointer(512) -- search for possible pointers to values loaded before

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.