Jump to content

[QUESTION] Strange addDebugHook results


zalector

Recommended Posts

Posted

A few players have been unauthorizedly modifying element datas and calling events so I have set up an addDebugHook preFunction hook to prevent backdoors and to get a better idea what's going on the server. However, this has led me to a dead end. Here is an example of what a debugHook result looked like:

sourceResource: my_resource (this one is good)
functionName: setElementData (also good)
isAllowedByACL: true
luaFilename: [string "local logEvents = true..."]
luaLineNumber: 0
functionArguments: ...args (good)

It seems as though the setElementData function is called from a non-existent file's 0th line, which is impossible. If you have any idea what this phenomenon might be, please help me out.

  • Moderators
Posted
1 hour ago, zalector said:

If you have any idea what this phenomenon might be

It could be from a loadstring environment. 'loadstring' is a function used to load a string in to code. One of the most tricky functions you can run in Lua(MTA).

https://www.lua.org/pil/8.html

Posted

Yeah, that's what I thought at first too, but every file has been manually checked. Also, loadstring is disabled in ACL and via script as well.

  • Moderators
Posted
15 hours ago, zalector said:

Yeah, that's what I thought at first too, but every file has been manually checked. Also, loadstring is disabled in ACL and via script as well.

You could also check if the same issue appears when the resource is zipped. That situation creates issues for the call-trace Lua debug functions. So it might be similar to this as well.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...