简体   繁体   English

我正在尝试检测用户是否在我之前执行 lua 代码

[英]I am trying to detect if a user executes lua code before mine

How would i detect if a user executes any code before my code?我如何检测用户是否在我的代码之前执行了任何代码? Ive tried this:我试过这个:

setmetatable(getfenv(), {

    __newindex = function(t,i,k)
      print(t,i,k)
    end
})

print("a")

and it doesn't detect, im using this to make a whitelist for roblox so i am trying to prevent people from executing debuggers before it它没有检测到,我用它来为 roblox 创建一个白名单,所以我试图阻止人们在它之前执行调试器

You can't.你不能。 If other code runs before your code, it can sandbox you and you'd never know.如果其他代码在您的代码之前运行,可以对进行沙箱处理,而您永远不会知道。 Also, generally if you're trying to implement anti-debugging, you're doing something that you shouldn't.此外,通常如果您尝试实现反调试,则您正在做一些您不应该做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM