Jump to content
  • 0

How to edit offset value with unstatic value?


KarimIdris999997

Question

1) get list item.if value 555666 then offset 4 is A and offset 8 is B.

2)get list item.if value 777888 then offset 4 is C and offset 8 is D.

3) A,B,C,D is unstatic value.

4)How to edit C to A value and D to B value with gg.type dword.

Can anyone help me with the script command.It will be great if anyone can provide an example script so that i can learn from that.I am looking forward to make t3l3p0rT to aim ch34t.

@MonkeySAN

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

gg.clearResults()
gg.loadResults(gg.getListItems()) -- get values in list item
gg.refineNumber("7777888", gg.TYPE_DWORD) -- filter value 7777888
local results = gg.getResults(1)
	t ={}
	t[1] = {}
	t[1].address = results[1].address + 4 -- offset 4
	t[1].flags = 4 -- type Dword
	k ={}
	k[1] = {}
	k[1].address = results[1].address + 8 -- type Dword 8
	k[1].flags = 4 -- type Dword

C = gg.getValues(t)[1].value -- get the C value
D = gg.getValues(k)[1].value -- get the D value

gg.clearResults()
gg.loadResults(gg.getListItems()) -- get values in list item
gg.refineNumber("55556666", gg.TYPE_DWORD) -- filter value 55556666
local count = gg.getResultsCount()
local results = gg.getResults(count) get all values from count
local values = {}
for i, v in ipairs(results) do
    local index = (i - 1) * 2
    local addr = v.address
    values[index + 1] = {address = addr + 4, flags = gg.TYPE_DWORD, value = C, freeze = true} -- set C to A
    values[index + 2] = {address = addr + 8, flags = gg.TYPE_DWORD, value = D, freeze = true} -- set D to B
end
gg.setValues(values)
gg.addListItems(values)

Is this what you want?

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.