collectgarbage()setgarbage()gcmodify()garbagecontrol()load() function?
package.loaded to a custom value in Lua?
debug library sets a hook for Lua’s execution?
debug.sethook()debug.settrace()debug.setcallback()debug.execute()debug.sethook() function allow you to do?
debug library?
debug library help in debugging scripts?
debug library’s hook functionality?
os.exit()debug.getupvalue()loadstring()setfenv()setfenv() function contribute to sandboxing?
load()dofile()require()loadstring()package.loaded in a sandbox environment?
loadfile() function in a sandboxed environment?
io.read()os.execute()debug.traceback()require functiontable methodsloadstring()debug.getinfo()debug.printenv()getfenv()env.print()debug.getlocal() function?
debug.traceback() function?
setfenv() function be used to limit global access in a sandboxed environment?
io libraryrequire()load()pcall()dofile()require()setmetatable()loadstring()setfenv()debug.sethook()os library in a properly configured Lua sandbox?
setfenv()getfenv()load()dofile()| Qno | Answer (Option with the text) |
|---|---|
| 1 | A) collectgarbage() |
| 2 | B) Compile Lua code from a string |
| 3 | C) Customize runtime behavior |
| 4 | D) All of the above |
| 5 | B) It affects the module loading behavior |
| 6 | A) debug.sethook() |
| 7 | C) Monitor function calls, returns, and line changes |
| 8 | B) Line, call, return, and count |
| 9 | A) By logging execution flow and state |
| 10 | C) Hooks do not provide information on function arguments |
| 11 | B) Isolating potentially dangerous code execution |
| 12 | D) setfenv() |
| 13 | A) Modifies the global environment for a function |
| 14 | D) All of the above |
| 15 | A) load() |
| 16 | A) Prevent libraries from being loaded into memory |
| 17 | B) Allowing code to access global resources |
| 18 | A) It loads Lua code from a file, but restricts access to sensitive system resources |
| 19 | D) All of the above |
| 20 | A) Modifying the require function |
| 21 | C) getfenv() |
| 22 | A) Returns local variables of a function |
| 23 | A) Trace the call stack of function calls |
| 24 | A) By restricting the global environment of functions |
| 25 | B) Modified global environment |
| 26 | B) pcall() |
| 27 | C) setfenv() |
| 28 | A) Ensuring the environment is fully isolated from the system |
| 29 | B) The function will fail due to sandbox restrictions |
| 30 | A) setfenv() |