Jump to content

Lack of ideas!


XEKEX

Recommended Posts

Posted

Give me idea of lua code , function or idea that can be useful in GG scripting!
I'll try to make it happens

|
.
|
.
|
.

👉👈

Posted
On 3/7/2023 at 11:32 AM, Soruh said:

Can you make function to spawning event on Grim Soul? And there is a new version, can you update the script accordingly? Please!

already Grim soul script have that function 
Note : last update will be soon.

Posted

Not sure how you can get lack of ideas. If this helps you:

A "general" solution for gg.getRangesList(). Filtering by lib doesn't work on a lot of 64 bit games because there path name is renamed to split.apk. Which is a bit annoying if you want to use it's function.

Perhaps a script that automatically updates the values of the address in cases of address offset calculation.

A function to add multiply tables in the saved list by only using once gg.addListItems() once, like gg.addListItems(a, b, c)

A teleport script template, would benefit players that want to make teleport scripts.

A script that calculate the branch instruction offset and modifies the value at that address. GG has the feature but dunno how to script it.

A script that takes a table like gg.getResults(),but in case the value changed it is not allowed to edit the value and must move on to the next index.

Im not sure if possible but a Lua script that hooks on the desired function to capture and manipulate client data before it being sended to server.

 

Hope this helps.

Posted
On 3/9/2023 at 5:27 PM, nok1a said:

Not sure how you can get lack of ideas. If this helps you:

A "general" solution for gg.getRangesList(). Filtering by lib doesn't work on a lot of 64 bit games because there path name is renamed to split.apk. Which is a bit annoying if you want to use it's function.
I'm not x64 user I can't test it 😞 

Perhaps a script that automatically updates the values of the address in cases of address offset calculation.

Keep control to gg.getResults (#53ngqjrv)

A function to add multiply tables in the saved list by only using once gg.addListItems() once, like gg.addListItems(a, b, c)
 

local originalAddListItems = gg.addListItems -- keep a reference to the original function
gg.addListItems = setmetatable({}, { -- whenever we call it, it call originaladdListItems
    __call = function(t, ...)
        local args = {...}
        local argTable = {}
        for i, arg in ipairs(args) do
          if type(arg) == 'table' then --assert the values are tables
            argTable[i] = arg
            originalAddListItems(argTable[i])
            else 
              error(string.format('addListItems(table explected) got %s ',type(arg)))
          end
        end
    end
})
gg.addListItems(table1,table2,table3, etc ... )



 

A teleport script template, would benefit players that want to make teleport scripts. -> i'll try it in future 

A script that calculate the branch instruction offset and modifies the value at that address. GG has the feature but dunno how to script it.

-- set the range of memory for searching
local range = gg.getRangesList('libil2cpp.so')

-- set the base address of the memory range
local lib_Base = string.format('0x%X',range[1].start)

-- prompt the user to input an offset value
local addr = gg.prompt({'Method Offset : '},nil,{'number'})

-- check if an offset value has been provided
if addr then
-- convert the provided offset to a number and add the base address
local offset = (type(addr[1]) == 'number'and addr[1] or tonumber('0x'..addr[1]))
local t = {}
t[1] = {address = lib_Base + offset , flags = gg.TYPE_DWORD}

-- get the ARM instruction at the calculated memory address
t =  gg.getValues(t)[1]
local instruction = gg.disasm(gg.ASM_ARM,t.address, t.value )
t.name = string.format('0x%X',offset)..' : '..instruction
-- check if the instruction is a push or pop operation
local push_pop = instruction:match("(%P-)%s+{%g+}")
local inst_set = {}

-- if the instruction is a push or pop operation
if push_pop then 

    -- loop through the instructions until a branch (B) or branch and link (BL) instruction is found
    local i = 0
    local found = false
    repeat
        -- search for a BL instruction in the current instruction
        local capture_hex, offset_ = instruction:match("B%L*%s*(0x%x+)%;?%s*(%-*0*x*%x*)")

        -- if a BL or B instruction is found, search for the destination address
        if capture_hex then 
            local dest = {[1]={address = capture_hex , flags = gg.TYPE_DWORD}}
            dest = gg.getValues(dest)
            local dest_arm = gg.disasm(gg.ASM_ARM,dest[1].address, dest[1].value)
            local capture_dest_hex, offset_ = dest_arm:match("B%L*%s*(0x%x+)%;?%s*(%-*0*x*%x*)")

            -- if the destination address is found, show the instruction and its destination
            if capture_dest_hex then -- if the destination is another B or BL
                local dest_value = gg.getValues({[1] = {address = capture_dest_hex,flags=gg.TYPE_DWORD}})
                local dest_arm_ = gg.disasm(gg.ASM_ARM,dest_value[1].address, dest_value[1].value)
                local des_push = dest_arm_:match("(%P-)%s+{%g+}")
                if des_push then -- this will check if destination is a method and add the 1st method
                gg.addListItems({t})
                end
                gg.alert(string.format('%s\n|\n->%s\n\t|\n\t->%s',instruction,dest_arm,dest_arm_))
                gg.addListItems({{address = capture_dest_hex , flags = gg.TYPE_DWORD,name = string.format('0x%X', capture_dest_hex - lib_Base) .. ' : '.. dest_arm_}})
                 --capture_dest_hex is the address of the instruction
            else
                -- if the destination address is not found, add the current instruction to the list
                gg.alert(string.format('Found : %s\n destination : %s',instruction,string.format('0x%X',capture_hex)))
                gg.addListItems({t})
                gg.addListItems({{address = capture_hex , flags = gg.TYPE_DWORD,name = string.format('0x%X',capture_hex - lib_Base) .. ' : '.. instruction}})
					--capture_hex is the address of the instruction
            end
            found= true
            break;
        end

        -- add the current instruction to the instruction set and move to the next instruction
        inst_set[#inst_set+1] = {address = t.address + i , flags = t.flags}
        inst_set = gg.getValues(inst_set) 
        instruction = gg.disasm(gg.ASM_ARM,inst_set[#inst_set].address, inst_set[#inst_set].value)
        push_pop = instruction:match("(%P-)%s+{%g+}")
        inst_set[#inst_set].name = instruction
        gg.toast(instruction)
            i = i + 4
        until (push_pop == 'POP' or found ) -- until we find Branch or The end of the method
        if not found then -- if it doesn't find Branch it add all the method instruction
            gg.addListItems(inst_set) -- this will add all the method instructions
            gg.alert('BL instruction in this Method Not found!') end
        end
    end

-- this is a template you may need to change the code so you can use it to edit the values directly with gg.setvalues


 

A script that takes a table like gg.getResults(),but in case the value changed it is not allowed to edit the value and must move on to the next index.
it's not possible cuz __index and __newindex methods can't read numeric keys 😞 

Im not sure if possible but a Lua script that hooks on the desired function to capture and manipulate client data before it being sended to server.
It's possible with frida but GG it's impossible i guess

 

Hope this helps.
yeah thank you ❤️ 

 

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.