Jump to content

CmP

Contributor
  • Posts

    640
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by CmP

    Quite useful tool for inspecting libraries in process memory. Thanks for the contribution.
  1. You write some nonsense. It's also not related with the topic anyhow. Maybe my upvote to @Lenn1's comment has "hurt" you hard enough, so that you decided to mention me?
  2. Log of using the script produced by slightly modified Script compiler: Those checks are pretty useless, because all of them can be bypassed. Script that is executing another script can override any function used for limitations (such as "blocking hooks", "setting expiration time") there. For example, a script relies on "os.date" function to check expiration time, but the function surprisingly returns not the expected result, but "0" or something else that will make that check useless.
  3. CmP

    Template

    for _=1, #Menu - 0.5 do if _ % 2 == 1 then -- ... end end is identical to for _ = 1, #Menu - 0.5, 2 do -- ... end but second option is more effective and clear.
  4. Calling "load" function with some meaningless arguments in a loop, so that logging arguments of the function call to a separate file will produce many files with junk contents. In fact, this does not "block" anything. Actual code (in compiled or non-compiled form) will still be logged to a file, if script contains it.
  5. @noblack, you forgot to delete the line in function "main". Also isVisible function does not accept arguments, so that "true" in this line is redundant. Moreover, this only works because of how Lua deals with extra arguments. From the Lua 5.3 reference manual (https://www.lua.org/manual/5.3/manual.html#3.4.11) : Another thing is that value returned by "prompt" function needs to be checked (because the dialog may be cancelled, in some cases accidentally) as well as value that is stored in "Result[4]", but I suggest you to leave these improvements to be done by the author of the topic (if he needs them at all).
  6. CmP

    LUA scripting

    You need to learn Lua and GG API, because the result can not be achieved without knowledge. There are at least 2 mistakes in your script because of which "it's not freezing": 1. Wrong usage of getListItems function. Incorrect usage: Correct usage: local list = gg.getListItems() 2. Using setValues function and expecting it to do the job of addListItems function. Incorrect (and even absurd) way to add items to the saved list: Correct way: list[1].value = '10000' list[1].freeze = true gg.addListItems(list)
  7. Also that "UI" variable is redundant in your case. Don't use something just because others do it. Your main loop can be rewritten this way: while true do if gg.isVisible() then gg.setVisible(false) main() end gg.sleep(100) end
  8. You need to explain that "idea" using words and not just drop some block of code. Noone here can read your thoughts. Moreover, quality of question/problem explanation affects receiving (or not receiving) answers more than anything else.
  9. CmP

    Requests for GG

    Got it, thanks for the answer. I assume that this information will be helpful for other forum members as well, since the question is not so trivial.
  10. CmP

    Requests for GG

    Well, this function is indeed very useful, but the question is: does it return updated information about process memory regions (because this is what author of the topic has written about, I suppose). I tried to find an answer to this question and got the following results. Script that was used for testing: local function calcTotalSize(ranges) local total = 0 for _, v in ipairs(ranges) do if v.state == 'Jh' or v.state == 'Ch' or v.state == 'Ca' or v.state == 'Cd' or v.state == 'Cb' or v.state == 'A' then total = total + (v['end'] - v.start) --print('start: ' .. v.start, 'end: ' .. v['end']) end end return total end local t1 = gg.getRangesList() print('Start') print('Count:', #t1) print('Size:', calcTotalSize(t1)) gg.setVisible(false) while not gg.isVisible() do gg.sleep(100) end local t2 = gg.getRangesList() print('\nFinish') print('Count:', #t2) print('Size:', calcTotalSize(t2)) Testing strategy: 1. Select targeted process (to get updated info about it's memory regions). 2. Launch the script. 3. Perform something in targeted process to "trigger" memory allocation/deallocation. 4. Click on GG floating icon. 5. Analyze info from the script output. Script execution result: Conclusion: Apparently, if I am not missing something, "getRangesList" function does not update info about process memory regions.
  11. CmP

    Requests for GG

    He probably meant info that GG receives when it is attached to the process. For example, list of memory regions, total "size" of process in memory, etc.
  12. You forget to check the value that is returned by your "GetLibraryTextBase" function. If the library was not found, function will return nil, which will be assigned to the variable "Base". Then some number is added to the variable, what leads to the error "attempt to perform arithmetic __add on nil and number" in this case. Typical user most likely won't understand what happened, so maybe it is better to handle this case appropriately.
  13. CmP

    Freeze error

    Tap Counter (#1e1gmlc8) You should have tried searching the forum before asking for the link, it's not rocket science.
  14. Little tweak to the solution above, so that returned string will look like address in GG: function toHexString(n) return string.format('%08X', n):sub(-8) end print(toHexString(12398754))
  15. View File Error handling for GG API functions template Note: This file is intended to be used by script developers. If you don't develop scripts or don't know what it is, ignore this file. Description: The file consists of three functions: - "attachHandler" function modifies a function in a way that when it returns a string, specified error handling function is called with that string as argument. It returns modified version of the function. This function should only be used on functions that return a string with error description when an error occurs. There is a list of such functions from GG API in the file. - "defaultHandler" function is an example of error handling function. - "testError" function (commented by default) "simulates" a function that has returned a string with error description, used for testing. How to use: 1. Include contents of the file at the beginning of your code. 2. Optionally create custom error handling functions. Error handling function has to accept 1 argument - a string with error description. 3. Use "attachHandler" function to get modified version of the function and either redefine original function with it or store it in a new variable. 4. Repeat step 3 for all desired functions. Examples: -- Custom error handling function local function myHandler(errorText) gg.toast('Whoops, looks like something went wrong', true) gg.toast('Mysterious error: ' .. errorText) print('Description of the error that has occurred during script execution:\n' .. errorText) end -- Using default error handling function and redefining the original function gg.searchNumber = attachHandler(gg.searchNumber, defaultHandler) -- Using custom error handling function and storing modified function in a new variable local getResultsModified = attachHandler(gg.getResults, myHandler) -- If an error occurs, "defaultHandler" function will be called gg.searchNumber('123', gg.TYPE_DWORD) -- If an error occurs, no error handling function will be called local results1 = gg.getResults(100) -- If an error occurs, "myHandler" function will be called local results2 = getResultsModified(100) Submitter CmP Submitted 01/01/2019 Category Templates  
  16. Version 2.0

    699 downloads

    Note: This file is intended to be used by script developers. If you don't develop scripts or don't know what it is, ignore this file. Description: The file consists of three functions: - "attachHandler" function modifies a function in a way that when it returns a string, specified error handling function is called with that string as argument. It returns modified version of the function. This function should only be used on functions that return a string with error description when an error occurs. There is a list of such functions from GG API in the file. - "defaultHandler" function is an example of error handling function. - "testError" function (commented by default) "simulates" a function that has returned a string with error description, used for testing. How to use: 1. Include contents of the file at the beginning of your code. 2. Optionally create custom error handling functions. Error handling function has to accept 1 argument - a string with error description. 3. Use "attachHandler" function to get modified version of the function and either redefine original function with it or store it in a new variable. 4. Repeat step 3 for all desired functions. Examples: -- Custom error handling function local function myHandler(errorText) gg.toast('Whoops, looks like something went wrong', true) gg.toast('Mysterious error: ' .. errorText) print('Description of the error that has occurred during script execution:\n' .. errorText) end -- Using default error handling function and redefining the original function gg.searchNumber = attachHandler(gg.searchNumber, defaultHandler) -- Using custom error handling function and storing modified function in a new variable local getResultsModified = attachHandler(gg.getResults, myHandler) -- If an error occurs, "defaultHandler" function will be called gg.searchNumber('123', gg.TYPE_DWORD) -- If an error occurs, no error handling function will be called local results1 = gg.getResults(100) -- If an error occurs, "myHandler" function will be called local results2 = getResultsModified(100)
  17. This is not a bug, it is supposed to work like that. Refer to description of "searchNumber" function in GG help: https://gameguardian.net/help/classgg.html#a7efd4ac7766e72688cb4a84a3915721e So if you need new search, make sure to clear results list first.
  18. You sent region log, but logcat is also required. These are not same things. More info about logcat: https://developer.android.com/studio/command-line/logcat https://stuff.mit.edu/afs/sipb/project/android/docs/tools/help/logcat.html
  19. This question is quite common on the forum. Here are possible options:
  20. Same way as for exact values, but using ranges. For example, a string for group searching these values with default group size looks like: "7~7.1;13.9~14;21~21.1". More information about this can be found in GG help: https://gameguardian.net/help/help.html#help_group_search_ https://gameguardian.net/help/help.html#help_range_search
  21. I am little late, because the answer is already given, but have one thing to add. If you need to match '[' character in the string, insert escape character ('%') before it, example: "abc123%[59959". Additional info about patterns in Lua can be found here: https://www.lua.org/pil/20.2.html
  22. Which patterns did you use, if it's not private info? Pattern is second argument of the call to string.find function, in your case it's value of the variable "v".
  23. You need to use "Changed/Unchanged" if you want to find xor-encrypted value with fuzzy search. "Increased/Decreased" won't work out because of how xor-encryption works.
×
×
  • 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.