Jump to content

CmP

Contributor
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by CmP

  1. CmP

    Freeze error

    Tap Counter (#1e1gmlc8) You should have tried searching the forum before asking for the link, it's not rocket science.
  2. 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))
  3. 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  
  4. Version 2.0

    743 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)
  5. 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.
  6. 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
  7. This question is quite common on the forum. Here are possible options:
  8. 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
  9. 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
  10. 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".
  11. 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.
  12. Here is a part from the script that is used in GG for text search: if utf16 then encoding = 'UTF-16LE' end It means that "UTF-16LE" encoding is used if user selects corresponding option (via checkbox). So, if you need same result as in GG text search, then use this encoding. Also check my previous comment, I have added info that explains why you got different result when "UTF-16" encoding was set.
  13. Are you sure that string that you are searching for is encoded in UTF-16 in process memory? You may try other encodings from available ones (see "bytes" function description in GG API reference). Edit: Those 2 bytes at start of the array from your second screenshot is byte order mask. You need to use "UTF-16LE" encoding in your case. I am not sure that BOM won't be included if you choose it, give it a try.
  14. Here is an example that you have asked for. Function to search text was taken from this post. function searchText(text, encoding) local bytes = gg.bytes(text, encoding) local ret = '' for i, b in ipairs(bytes) do ret = ret..';'..b end ret = ret:sub(2)..'::'..#bytes return gg.searchNumber(ret, gg.TYPE_BYTE) end function getResultsCount() if gg.getResultsCount then return gg.getResultsCount() end return gg.getResultCount() end local input = gg.prompt({'Input string to search:'}, nil, {'text'}) local str = '' if input == nil then -- Something to do if the prompt window was cancelled (this block can be omitted) end if input ~= nil then str = input[1] end if #str > 0 then gg.clearResults() searchText(str, 'UTF-16') gg.getResults(getResultsCount()) gg.editAll('1', gg.TYPE_BYTE) end text_search.lua
  15. You can't write like this. os.exit is a function and goto operator only works with labels. Either you make a call to the function (remove goto operator) or you jump to some label (replace os.exit() with label name), choose one option.
  16. Unfortunately, as I have written, you CAN'T protect the strings that are being searched in your script. If the user is able to run the script, then he can also find out, what strings were searched by the script. There is built-in GG feature, that logs every call to GG API in a text file, so if your script executes, for example, gg.searchNumber('123', gg.TYPE_DWORD), then user will see it in log file.
  17. He is using "choice" function. Not that it makes big difference, just a notice. Code after "sdone" label probably contains a call to os.exit function, so the script will terminate in both cases (when the user chooses "Exit" and when dialog was cancelled). Agree with this one, but maybe he want the script to terminate, if the dialog was cancelled, who knows.
  18. This won't prevent the user from logging script actions. If your goal is to protect the script, then hiding GG UI won't help almost anyhow.
  19. CmP

    LUA scripting

    How to ask primitive questions without reading API help? Please, do it in reverse order (first - check help pages, then ask question, if answer was not found there). https://gameguardian.net/help/classgg.html#a7efd4ac7766e72688cb4a84a3915721e
  20. It may happen if the code is being copied from forum (in particular, from the box of formatted code generated by this option: ). Retype the line where an error occurred manually.
  21. These optimizations look unbelievable. Thanks for another great update of the app.
  22. Use "removeListItems" functions to remove desired elements from saved list or "clearList" function to remove everything from saved list. When an element is removed from saved list, it is automatically being unfreezed, so no need to set "freeze" field to false in these cases. Edit: your code can be adjusted this way to reduce "complexity" gg.clearResults() gg.searchNumber('0.91610002518', gg.TYPE_FLOAT) local t = gg.getResults(11) for i, v in ipairs(t) do t.value = '1.902456' t.freeze = true t.freezeType = gg.FREEZE_NORMAL end print('Replaced: ', gg.addListItems(t)) gg.sleep(250000) print('Replaced: ', gg.removeListItems(t)) Only elements that were added to saved list will be removed from it after the delay.
  23. Reading GG API help before asking such simple questions about it is a good habit for every member of the forum. https://gameguardian.net/help/classgg.html#a5f281d50d0ff0846c9c0594a61895dce
  24. CmP

    GameGuardian

    @Anonymous1000, it looks like you've never participated in any kind of discussion, because you clearly don't know, what to do. Instead of analyzing my comments and expressing your thoughts about them, you are writing some (off-topic) stuff about "problems in mind", lack of intelligence, etc. Usually those, who blame everyone about having low level of intelligence, lack the intelligence themselves. I see that you are feeding your ego with these comments, you don't care about the truth. Well, won't disturb you from doing it, but also won't help with it anymore (by continuing to answer your comments). Good luck.
  25. CmP

    GameGuardian

    I do understand that you had no imagination about what is changed in optimized versions of virtual space apps, it was like "black box" from your perspective. Now you know, your eyes is opened and you can see that mysterious "black box" is just one line changed in the manifest of the app (no need to thank me). Also my reply was dedicated to the certain part of your comment, not to the whole comment, so your talk about me not understanding something from what you have written is completely irrelevant.
×
×
  • 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.