Lua Sandbox Environment

Notice about any update or system change
Post Reply
Administrator
Site Admin
Posts: 33
Joined: Tue Mar 07, 2023 7:56 am

Lua Sandbox Environment

Post by Administrator »

Wapka Provide Native Support for Lua Scripting Language.

Wapka Developed highly customize Lua Sandbox Environment on top of Standard Lua 5.1

Wapka provides a modified version of Lua Environment which differs in some ways from standard Lua 5.1.

Differences from Standard Lua
Features that are not available
dofile(), loadfile(), and the io package is removed as wapka don’t provide direct file system access.

The package package, including require() and module(), as it depends heavily on direct filesystem access.

Most of the os package, as it allows manipulation of the process and executing of other processes.

os.clock(), os.date(), os.difftime(), and os.time() remain available.

Most of the debug package, as it allows manipulation of Lua state and metadata in ways that can break sandboxing.

debug.traceback() remains available.

string.dump(), as it may expose internal data.

collectgarbage(), gcinfo(), and the coroutine package have not been reviewed for security.



Features that have been modified


print() non printable data will be converted to json before printing. So when you try to print Lua table it will become JSON object.

pcall() and xpcall() cannot catch certain errors, particularly timeout errors.

tostring() does not include pointer addresses.

string.match() has been patched to limit the recursion depth and to periodically check for a timeout.

The Lua 5.2 __pairs and __ipairs metamethods are supported by pairs() and ipairs().



Features that have been Added
dump() similar to print but it will show human readable format for various data type good for debuging.

include() to import any page by name.

loadstring() to import any lua code from other source and return as function.

getcode()to get any code by their ID, name, or Hash Value.

More Module & Library:

Code: Select all

server ---> library to modify web server
req   ----> the http request library
env ----> for environment variable and other private data 
proxy ----> remote proxy library
encoder ----> data encoder library
decoder ----> data decoder library
hash ----> cryptic hashing library
url ----> for url related work and request processing
html  ----> to simple handle site html content and separate head body
api ----> Wapka API Library for many advance work


Wapka Lua Sandbox Environment is modified based on User Package for free site user will get less resource for Premium Site User will get More time speed and resource so we suggest you to subscribe any premium package.


Original post: https://jonayed-hossan.com/wapka/lua/lu ... vironment/
Post Reply