This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CLNinja's profile picture

SBox | Sandboxing utility

Started by CLNinja, 09 July 2017 - 08:40 PM
CLNinja #1
Posted 09 July 2017 - 10:40 PM
SBox is a sandbox utility that allows you to quickly sandbox a program to its own folder.

To install and use



pastebin get 44nvWqA8 sBox
-- Editor here
os.loadAPI("sBox")
sBox.init(directory,"true/false launch startup","true/false nuke the folder")
sBox.fres() -- sets up the file resolver and FS overwrites
sBox.sBox() -- launches the sandbox



I've tested it with and OS me and a friend developed, Vorbani OS, which is very highly sandboxed itself, and it works inside of my sandbox here.
Edited on 08 December 2017 - 02:14 AM
CLNinja #2
Posted 12 July 2017 - 01:22 AM
updated to add a new argument: PROGRAMNAME <folder> [true/false to boot from startup (defaults to false)] [optional 'true' to nuke folder]
The Crazy Phoenix #3
Posted 24 July 2017 - 04:30 PM
The rom is no longer accessible if the sandbox isn't set to a directory inside the root directory (e.g. "SBox /1/2" doesn't work)
In other cases, the sandbox fails if using "&#46;&#46;/rom/&#46;&#46;/<path>" (can be used to access "/<path>")
Edited on 24 July 2017 - 02:39 PM
CLNinja #4
Posted 05 December 2017 - 02:38 AM
Update: Sorry I haven't actually updated this in a while and I'm practically necroing this post, but oh well!

I've updated it to be a little more functional, as well as adding the ability to os.reboot and return back to the normal shell. It restores the fs calls back to normal, as well as restoring os.reboot itself.
CLNinja #5
Posted 05 December 2017 - 05:21 PM
Update: Fixed the ability to overwrite string.sub to allow breaking of my path resolver.
CLNinja #6
Posted 08 December 2017 - 03:14 AM
Update to how the program works: It isnt a program anymore!

Its turned into an api!


pastebin get 44nvWqA8 sBox
-- Editor here
os.loadAPI("sBox")
sBox.init(directory,"true/false launch startup","true/false nuke the folder")
sBox.fres() -- sets up the file resolver and FS overwrites
sBox.sBox() -- launches the sandbox