JeViCo Posted August 18, 2018 Share Posted August 18, 2018 Hello everyone! How can i protect my fetchremote function from possible bypasses? variable replacement etc? Link to comment
Moderators IIYAMA Posted August 18, 2018 Moderators Share Posted August 18, 2018 (edited) You might be able to validate the function with: https://www.tutorialspoint.com/lua/lua_debugging.htm This doesn't stop the function from being overwritten, but you can stop the script operations if the info tells you that a lua function is called instead of a C function.(afaik default mta functions are considered as C functions, but not 100% sure) print(debug.getinfo(1)) Maybe getinfo does the job: Quote getinfo(optional thread, function or stack level, optional flag) Returns a table with info about a function. You can give the function directly, or you can give a number as the value of function, which means the function running at level function of the call stack of the given thread − level 0 is the current function (getinfo itself); level 1 is the function that called getinfo; and so on. If function is a number larger than the number of active functions, then getinfo returns nil. Edited August 18, 2018 by IIYAMA 1 Link to comment
JeViCo Posted August 19, 2018 Author Share Posted August 19, 2018 Thanks. I tested it. It really helps a lot Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now