Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Updated Version

Due to sandbox updates nodejs fs is now also restricted, this version fixes it with childprocess and a temp folder.

THIS NEEDS TO BE ADDED TO THE SERVER.CFG: add_unsafe_child_process_permission "script_name"

Sandbox Patches

FiveM Lua sandbox IO and OS lib patches

Due to FiveM's inclusion of Lua sandboxing in the latest build, this feature prevents your scripts from using functions such as io.open, io.popen, and os.execute. This script reimplements the io and os libraries using JavaScript, to allow you to utilize the aforementioned functions.

Installation

Clone this repository into your resources folder.

git clone https://github.com/ZeroDream-CN/sandbox-patches

Add the following to your server.cfg file:

ensure sandbox-patches
add_unsafe_child_process_permission "sandbox-patches"

Note: This resource must be started before any other resources that use the os or io libraries.

Usage

Add the following to your resource's fxmanifest.lua file:

server_script '@sandbox-patches/patches.lua'

or like this:

server_scripts {
    '@sandbox-patches/patches.lua',
    'server.lua' -- your other server scripts
}

Then you can use io and os functions as usual.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

FiveM Lua sandbox IO and OS lib patches / bypass

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages