892 posts
Location
Where you'd least expect it.
Posted 29 March 2013 - 11:38 AM
OSRunner
NEW FEATURE:
PERIPHERAL MANAGEMENT
Added peripheral support, protect your peripherals, configure your OSes to only be able to use only specific peripherals (changable per OS)! (Default all disabled)
In System Settings, Manage Peripherals!
Intro
After months of feature-adding,bug-fixing,and bug-fixing the bugs the bugfix made :P/>/>/>, it's finally out!
Features
OSRunner is a graphic-based utility that lets you run OS'es and other file-hogging programs that you don't want clogging up your main directory. It also emulates a virtual rom, which has all programs but secret/alongtimeago (I couldn't figure out how to copy it!). The nice GUI lets you add custom OS'es, reformat OS'es, and set the default OS. It also has some nice features such as os.reboot support, restoring _G and restarting the sandbox.
How It Works
OSRunner works by editing FS to make all programs, when using files, access them inside of their directory. I could explain MUCH more, but it would become a wall of text. :P/>/>/>
Download
Github:
Bug Reporting
Special Thanks
SuicidalSTDz and alakazard12 (GitHub Names) for developing with me.
Everybody who took the time to read this thread, and use this program.
Have fun with OSRunner !
Edit: Added poll.
451 posts
Location
The left part of this post
Posted 29 March 2013 - 11:58 AM
The startup script gives me an error on line 11 when i use the installer
892 posts
Location
Where you'd least expect it.
Posted 29 March 2013 - 12:24 PM
Fixed! Sorry. :P/>
892 posts
Location
Where you'd least expect it.
Posted 29 March 2013 - 12:58 PM
Added poll!
451 posts
Location
The left part of this post
Posted 29 March 2013 - 03:16 PM
I have hacked your sandbox jejeje if you type "cd .." it will go back and back and back till you can access the files in the computer without sandbox. Image:
edit: sorry for the other computer i was coding my new program xDD
Edited on 29 March 2013 - 02:17 PM
892 posts
Location
Where you'd least expect it.
Posted 29 March 2013 - 04:19 PM
Um.. that's akward… but I'll get on that right away.
Well, the program was never a jail, more of a utility, but I'll fix it.
How does the .. work?
Edit: I think it is like if you do rom/.. then you get default dir, right? Correct me if I'm wrong.
892 posts
Location
Where you'd least expect it.
Posted 29 March 2013 - 04:31 PM
Alright, fixing tomorrow, gotta shell.resolve all entries. :/
235 posts
Location
Germany
Posted 29 March 2013 - 07:25 PM
I love it :D/>
7508 posts
Location
Australia
Posted 29 March 2013 - 08:50 PM
How does the .. work?
Ok so that I didn't give the wrong explanation (or didn't say it exactly right) I traced back how the shell processes it. very hard traceback but I eventually traced it back to where it works. The parts of the path are iterated through and pushed to a
Stack, but if the part of the path is a '..' (or empty) the last element is popped off the stack.
Edit: I think it is like if you do rom/.. then you get default dir, right? Correct me if I'm wrong.
rom/.. would be /
also i discovered from the investigation above that
rom/../rom would be rom. although why you would want to do that I'm not to sure. overall, if you override fs.combine it will change it for every use (fs.combine is the top most accessible function that is used and where .. is processed)
hope this helped :)/> oh btw good job on this, finally something that isn't just an installer but actually adds a sandbox! :)/>
892 posts
Location
Where you'd least expect it.
Posted 30 March 2013 - 03:15 AM
D:
I figured out how to do it, but the drawback is that .. and ../.. and so on are valid paths, but just access the sandbox dir! (Nothing wrong with accessing sandbox dir, but making .. and ../.. valid paths is bad.)
How to fix…
1604 posts
Posted 30 March 2013 - 04:07 AM
Here's some functions I used in the old version of MysticOS to sandbox the users to their own directory:
Spoiler
local sDir = "/OS" -- change the sandbox directory here
local function splitPath(sPath)
local i = 1
local t = {}
for path in string.gmatch(sPath, "[^/\\]*[/\\]?") do
path = string.gsub(path, "[/\\]", "")
if path == ".." then
if i > 1 then
i = i - 1
t[i] = nil
else
return nil
end
elseif path ~= "" and path ~= "." then
t[i] = path
i = i + 1
end
end
return t
end
local function resolvePath(sPath)
local t = splitPath(sPath)
if t == nil then
return nil
end
local path = ""
if #t == 0 then
return sDir
end
for _,str in ipairs(t) do
if path == "" then
path = sDir.."/"..str
else
path = path.."/"..str
end
end
return path
end
The splitPath function just parses the path and returns a table with each part of the path. Then the resolve path uses that table to get the sandboxed path.
It's an old code I used, so there's probably some things to improve, but it should work as a starting point.
Hope this helps. And nice work with this :)/>
892 posts
Location
Where you'd least expect it.
Posted 30 March 2013 - 10:39 AM
Fixed in new version! :D/>
892 posts
Location
Where you'd least expect it.
Posted 30 March 2013 - 12:59 PM
Any features you guys want me to add?
301 posts
Location
Whenever, Wherever!
Posted 30 March 2013 - 06:13 PM
The same problem applys to ccbox, its being fixed, but….
fs=getfenv(fs.open) Would be able to get at the old fs unless you had patched getfenv. :)/>
892 posts
Location
Where you'd least expect it.
Posted 31 March 2013 - 03:59 AM
Umm…. No.
Just tested it. :P/>
And I DID NOT modify getfenv.
892 posts
Location
Where you'd least expect it.
Posted 10 April 2013 - 02:26 PM
Added new update with ability to update from inside of app!
1214 posts
Location
The Sammich Kingdom
Posted 10 April 2013 - 02:28 PM
I really don't see the use case for this(For meh at least). If for whatever reason I want to run multiple OSes(I don't even run one :P/>) then I would just make a new computer in CCEmu or my new favorite CCDesk.
892 posts
Location
Where you'd least expect it.
Posted 10 April 2013 - 02:31 PM
Well, maybe this just isn't for you then. I honestly use it to test file-abusing programs or ones that use lots of files. :P/> But, it can be very useful. Like deleting all files on the OS without using a disk, and the OS has nothing to do about it. :P/> :P/> :P/>
And, I understand why you would not use it in an emulator, but what about in MC (survival mostly, still useful in creative)?
1214 posts
Location
The Sammich Kingdom
Posted 10 April 2013 - 02:34 PM
I may use it for testing abusive programs but other than that I can't see myself use it even in MC. I hardly spend the time to use a custom OS because most of them just make a task take longer.
1511 posts
Location
Pennsylvania
Posted 10 April 2013 - 02:51 PM
I hardly spend the time to use a custom OS because most of them just make a task take longer.
Well yeah, CraftOS is command-line. Most of us devs just go for aesthetics. My OS is fairly efficient in the way it works (For the most part, as well this is just my opinion :P/>) I have made a personal script to run OSRunner in EnderOS since I like it so much, well, and helped with part of the code :P/>
EDIT:
I have hacked your sandbox jejeje if you type "cd .." it will go back and back and back till you can access the files in the computer without sandbox. Image:
edit: sorry for the other computer i was coding my new program xDD
Bravo, you hacked into a non-secure language. Do you want a cookie? Not everything can be 'hacker' free in Lua. As well, Mudkip and I thank you for pointing this bug out.
892 posts
Location
Where you'd least expect it.
Posted 10 April 2013 - 03:43 PM
I hardly spend the time to use a custom OS because most of them just make a task take longer.
Well yeah, CraftOS is command-line. Most of us devs just go for aesthetics. My OS is fairly efficient in the way it works (For the most part, as well this is just my opinion :P/>) I have made a personal script to run OSRunner in EnderOS since I like it so much, well, and helped with part of the code :P/>
EDIT:
I have hacked your sandbox jejeje if you type "cd .." it will go back and back and back till you can access the files in the computer without sandbox. Image:
edit: sorry for the other computer i was coding my new program xDD
Bravo, you hacked into a non-secure language. Do you want a cookie? Not everything can be 'hacker' free in Lua. As well, Mudkip and I thank you for pointing this bug out.
Uhh… Suicidal.. We fixed that a long time ago XD
1511 posts
Location
Pennsylvania
Posted 10 April 2013 - 04:06 PM
I hardly spend the time to use a custom OS because most of them just make a task take longer.
Well yeah, CraftOS is command-line. Most of us devs just go for aesthetics. My OS is fairly efficient in the way it works (For the most part, as well this is just my opinion :P/>) I have made a personal script to run OSRunner in EnderOS since I like it so much, well, and helped with part of the code :P/>
EDIT:
I have hacked your sandbox jejeje if you type "cd .." it will go back and back and back till you can access the files in the computer without sandbox. Image:
edit: sorry for the other computer i was coding my new program xDD
Bravo, you hacked into a non-secure language. Do you want a cookie? Not everything can be 'hacker' free in Lua. As well, Mudkip and I thank you for pointing this bug out.
Uhh… Suicidal.. We fixed that a long time ago XD
I know. That quote was meant to be made a long time ago, however, I could not post during that time. So, yeah :P/>
892 posts
Location
Where you'd least expect it.
Posted 10 April 2013 - 04:12 PM
Added poll on adding new OS'es.
67 posts
Posted 13 April 2013 - 12:53 PM
Oh yeah, I see you got it all done now :P/>.
1511 posts
Location
Pennsylvania
Posted 13 April 2013 - 01:53 PM
Oh yeah, I see you got it all done now :P/>.
Indeed so. It is very nice as well. I don't think I could live without it :P/>
67 posts
Posted 13 April 2013 - 02:26 PM
I still have access to the github repository. :P/>
892 posts
Location
Where you'd least expect it.
Posted 13 April 2013 - 04:24 PM
You still wanna develop it?
Edit: Suicidal, he was an early developer. He did the GUI. (Not the code, he painted it)
1511 posts
Location
Pennsylvania
Posted 13 April 2013 - 04:26 PM
You still wanna develop it?
Edit: Suicidal, he was an early developer. He did the GUI. (Not the code, he painted it)
I know :P/> I saw the edits made by him in the repo and I put 2 and 2 together.
67 posts
Posted 14 April 2013 - 03:02 AM
Yeah, I can help develop it, I'm currently not working on any projects. Is there a server you're doing this on?
892 posts
Location
Where you'd least expect it.
Posted 14 April 2013 - 03:19 AM
Nope. Just Github. But I MAY (rarely a chance of) set up a whitelisted creative CC server.
587 posts
Location
Wrocław, Poland
Posted 15 April 2013 - 06:25 AM
OSRunner works by editing FS
Smart!
587 posts
Location
Wrocław, Poland
Posted 15 April 2013 - 06:27 AM
I MAY (rarely a chance of) set up a whitelisted creative CC server.
Heh, I have my second server running with no load on it, you want me to host your server for you? I was planning to make CC server too :D/>
1511 posts
Location
Pennsylvania
Posted 15 April 2013 - 06:28 AM
OSRunner works by editing FS
Smart!
Well, it is kinda the only logical way to sandbox the program. If you don't overwrite the fs library functions, well, then the user can do whatever they want. Overwriting the fs library functions with our own functions allows us to set limits on what the user can and cannot edit/modify.
587 posts
Location
Wrocław, Poland
Posted 15 April 2013 - 06:50 AM
True it is :)/>
1214 posts
Location
The Sammich Kingdom
Posted 15 April 2013 - 07:41 AM
True it is :)/>
Yoda? :D/>
1511 posts
Location
Pennsylvania
Posted 15 April 2013 - 08:34 AM
True it is :)/>
Yoda? :D/>
Watch out kids, we've got ourselves a Star Wars fanatic :P/>
On topic: Hmm, I might have just found a bug. Brb :P/>Nvm <_</>
892 posts
Location
Where you'd least expect it.
Posted 15 April 2013 - 09:18 AM
True it is :)/>/>
Yoda? :D/>/>
Watch out kids, we've got ourselves a Star Wars fanatic :P/>/>
On topic: Hmm, I might have just found a bug. Brb :P/>/>Nvm <_</>/>
What "bug" did you "find"?
1511 posts
Location
Pennsylvania
Posted 15 April 2013 - 09:20 AM
True it is :)/>/>
Yoda? :D/>/>
Watch out kids, we've got ourselves a Star Wars fanatic :P/>/>
On topic: Hmm, I might have just found a bug. Brb :P/>/>Nvm <_</>/>
What "bug" did you "find"?
During startup, it just sat there. It was just CC-Emu :P/>
892 posts
Location
Where you'd least expect it.
Posted 15 April 2013 - 09:40 AM
Not to be mean or anything, but I would like to know why people are saying "Meh, I dont use it" in the poll. Is it because you don't use OS'es, or what? I just wanna know so I can improve the program. ;)/>
301 posts
Location
Whenever, Wherever!
Posted 16 April 2013 - 06:08 PM
I think you should add a option to boot an os from a disk.
587 posts
Location
Wrocław, Poland
Posted 16 April 2013 - 09:52 PM
True it is :)/>
Yoda? :D/>
Indeed true it is. But me be no Star Wars fan tho, yoda just funny sounds. :P/>
892 posts
Location
Where you'd least expect it.
Posted 21 April 2013 - 06:59 AM
Added "os.queueEvent("") coroutine.yield()"'s all over the place when reinstalling to stop too long without yielding. :D/>
587 posts
Location
Wrocław, Poland
Posted 21 April 2013 - 09:07 AM
Added "os.queueEvent("") coroutine.yield()"'s all over the place when reinstalling to stop too long without yielding. :D/>
Yeah, I hate this error too…
892 posts
Location
Where you'd least expect it.
Posted 21 April 2013 - 09:08 AM
Hate or had… maybe both. :P/>
Edit: Just wondering, why did someone choose "I HATE IT!" in the poll… Or was it just a troll.
Edited on 21 April 2013 - 09:02 AM
892 posts
Location
Where you'd least expect it.
Posted 22 April 2013 - 05:30 AM
Added PearOS along with partial BSOD.
(Worthy enough of a double post, : P)
67 posts
Posted 22 April 2013 - 09:32 AM
I have added disk support :)/>
892 posts
Location
Where you'd least expect it.
Posted 23 April 2013 - 04:15 AM
Added peripheral support, protect your peripherals, configure your OSes to only be able to use only specific peripherals (changable per OS)! (Default all disabled)
In System Settings, Manage Peripherals!
2 posts
Posted 24 April 2013 - 10:32 AM
Found out the hard way that it doesnt work with the normal computer
892 posts
Location
Where you'd least expect it.
Posted 24 April 2013 - 01:27 PM
Yah… forgot to add a clause for that…. Uhh…. This would be pretty impossible to modify for normal. Just use advanced (unless ur on tekkit).
892 posts
Location
Where you'd least expect it.
Posted 18 May 2013 - 11:01 AM
Sorry for bump, but added huge new feature: Wired peripheral support! Includes new "pages" of peripheral support, where you can select individual peripherals on a network to be able to interact with! Please post any bugs that didn't get caught during the bug-testing!
(First time I ever used a branch system for beta, and the app "Github for Mac" doesn't like it! XD)
2 posts
Posted 01 June 2013 - 05:55 PM
This happens every time I try to start an OS
892 posts
Location
Where you'd least expect it.
Posted 01 June 2013 - 06:27 PM
This happens every time I try to start an OS
Make sure you are on a version of ComputerCraft with peripheral cables.
770 posts
Location
In My Lonely Little Computer Corner
Posted 02 June 2013 - 07:11 PM
Do you want a cookie?
No, I wants a sammitch. :D/>
23 posts
Posted 19 June 2013 - 08:09 PM
Now we just need shared files and this will be perfect!
892 posts
Location
Where you'd least expect it.
Posted 19 June 2013 - 08:26 PM
Now we just need shared files and this will be perfect!
Between computers? I'm working on that, but as a separate program.