- ComputerCraft | Programmable Computers for Minecraft
- → GreenByteSoftware's Content
GreenByteSoftware's Content
There have been 13 items by GreenByteSoftware (Search limited from 10-February 22)
#269006 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 14 August 2017 - 06:16 PM
in
Operating Systems
#265857 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 27 March 2017 - 03:56 PM
in
Operating Systems
#265856 [CC 1.79] [Adv. Pocket Computer] craftAndroid [WIP]
Posted by
GreenByteSoftware
on 27 March 2017 - 12:51 PM
in
Operating Systems
pastebin run W5ZkVYSi Piorjade craftAndroid
#265855 [Off-Development]PockyOS v2.21 - Even more advanced pocket OS
Posted by
GreenByteSoftware
on 27 March 2017 - 12:45 PM
in
Operating Systems
CLNinja, on 26 March 2017 - 05:31 PM, said:
- No form of a shell which leaves very little control over the device at all.
- No way of adding more apps to the OS
- Requires adding a site to the whitelist
- Add a shell and modify fs to only allow editing of user made files
- Make the [More apps] option look through a folder that the user can put scripts into and have it scroll through and display them graphically
- Host on github or pastebin for the new files. Otherwise people will only be able to use past versions on servers.
#265841 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 26 March 2017 - 08:13 PM
in
Operating Systems
#265839 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 26 March 2017 - 06:47 PM
in
Operating Systems
Ok, I leave it here:
Version 2
Reworked the way things load.
Added getty which loads shell after all the services start. It can execute anything (just set by code) and it also prepares shell api for use. Everything seems to work with the api (at least /rom/programs/shell launches and does not crash).
Just like services, getty runs as a coroutine. It runs exactly like other services, except it is a foreground one.
Every coroutine has a PID, UID, and parent PID information. All APIs can identify who is the caller by using systemc.process table. Though, it can be overwritten and a local copy exists in systemc as _process. Also, a complete processes table can be retrieved.
#265835 Identifying API caller's environment
Posted by
GreenByteSoftware
on 26 March 2017 - 05:00 PM
in
Ask a Pro
Lyqyd, on 26 March 2017 - 02:54 PM, said:
#265830 Identifying API caller's environment
Posted by
GreenByteSoftware
on 26 March 2017 - 08:36 AM
in
Ask a Pro
Hello,
is there any way to identify the program started with os.run? I am trying to make it so that every program runs on a specific UID and has different levels of file/api access. The best way would be so that no craftOS API is broken. I already am able to replace the os.run API so I can modify it.
My current code is as follows:
function os.run( _tEnv, _sPath, ... )
local tEnv = _tEnv
lastid = lastid+1
local pid = lastid
ptable[pid] = {_sPath, uid}
ret = _osrun(tEnv, _sPath, ...)
ptable[pid] = nil
return ret
end
Where _osrun is the native os.run and a ptable and lastid are local variables.So, I have a process table, now the problem is that how do I get a parent uid/pid in any API (including os.run)? I could store something like a function or a table so that if a variable in program's environment is altered, then it would make calls as a nobody user.
#263778 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 17 January 2017 - 08:15 PM
in
Operating Systems
H4X0RZ, on 17 January 2017 - 06:56 PM, said:
GreenByteSoftware, on 17 January 2017 - 04:43 PM, said:
クデル, on 16 January 2017 - 03:35 AM, said:
you can search for more advanced stuff using google. Just search for
computercraft.info: <your query here>and it should show you all the pages google knows of.
#263773 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 17 January 2017 - 04:43 PM
in
Operating Systems
Admicos, on 16 January 2017 - 08:55 AM, said:
クデル, on 16 January 2017 - 03:35 AM, said:
#263007 [Version 5] SystemC - the thing that takes over OS work
Posted by
GreenByteSoftware
on 24 December 2016 - 02:02 PM
in
Operating Systems
SystemC
More Than Just an Init System!
Hello again,
Today I would like to present you SystemC - something that became a bit bigger than I wanted it to be. Now it's basically like an OS, a base for an OS with really cool features like services similar to SystemD ones, file permissions, PoC user support (users are saved nowhere, sudo does no authentication), sandboxing support (I want you to try to break out of it) and many more things.
Currently half of the programs are very nig rigged, just like part of the inside code (for example support for SIGKILL was very hacky).
List of programs:
init - initializes SystemC
systemctl - managing services
systemc-nspawn - sandboxing
ls - listing files improved
chmod - change file permissions
chown - change file owners
kill - send signals to threads
ps - show threads
sudo - should be su, switches users
texec - useful for services
whoami - prints the current user id
This was sort of a side project when not feeling doing all the game hacking or game dev stuff I'm used to doing now.
How to install? Well, for now I will not create the installer because of so many files (7, I know), but you can grab all of these from github.
Link: https://github.com/G...oftware/systemc
Install (should work): pastebin run W5ZkVYSi GreenByteSoftware systemc
So some FAQ:
What's next? IDK, I am doing a lot of game hacking lately, specifically, csgo. So, this is a small side project.
What are services? Services are programs which run in the background. For example you can run something like a network command centre as a service.
How to define services? You can define them inside etc/systemc/system/ directory naming the file as somename.service. Inside, type in [Service] and in the next line ExecStart=, right after = without a space type the command you want to be executed. If you want to run the service on start, add [Unit] and in the next line type Wants=graphical.target. You will need to enable the service later. There is more, but much is not implemented yet. You can look how it looks like in actual SystemD here: https://access.redha...Unit_Files.html
How to start services? You need to use an utility called systemctl located ad bin directory. You are better of to add that directory to shell path in your startup (shell.setPath(shell.getPath().."sc_root_path/bin")). Systemctl start, stop, enable, disable do pretty much what they should do. Enable and disable toggle if the service gets started on boot.
Targets? Targets are basically the target state of the system. Currently there is only one target - graphical.target. When you run init, it defaults to this target (you can pass the target you want to run SystemC as an argument to init). The services which "want" the target and which are enabled at the same time get a directory inside the target making SystemC notice it on the next reboot and run it.
SystemC-Nspawn. What is this? It basically is the Chroot script I posted earlier but integrated with SystemC a bit.
What are the options? Basically run the command without arguments, it should show the usage. Unless you know what you are doing, you should not type the argument to not copy the ROM folder. Without SystemC, the containers should work just fine, as long as you do not use -b option.
Has SystemD come too far? Why? Will it include the full office suite?
Yes to all.
Things to do:
Ability to delay between things to make you look cool
Timers
Other SystemC units
Fix one quirk in SystemC library's run function
SystemC Office, of course
And for the last, I made this up. Linux users might understand this.
What you guys are referring to as Linux, is in fact, SystemD/Linux, or as I've recently taken to calling it, SystemD plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning SystemD system made useful by the SystemD bloat, bloat utilities and bloat system components comprising a full OS as defined by US.
Many computer users run a modified version of the SystemD system every day, realizing it very well. Through a peculiar turn of events, the version of SystemD which is widely used today is often called "Linux", and many of its users are not aware that it is basically the SystemD system, developed by the SystemD Project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the SystemD awesomeness system: the whole system is basically SystemD with Linux added, or SystemD/Linux. All the so-called "Linux" distributions are really distributions of SystemD/Linux.
- Lennart Poettering 2019
Credits:
Lymia - for writing the original chroot script
Dan200 - for making the bios.lua and CraftOS
Bryan Lunduke - for somehow inspiring me to make this
#262966 Chroot jail for CraftOS 1.7
Posted by
GreenByteSoftware
on 22 December 2016 - 08:34 AM
in
APIs and Utilities
#262888 Chroot jail for CraftOS 1.7
Posted by
GreenByteSoftware
on 20 December 2016 - 11:26 PM
in
APIs and Utilities
It has been a long time since I posted anything here, but this is something many people (especially those who recently came up with Linux imitating OS) would be interested in. This is chroot jail working on CraftOS 1.7 (tested on minecraft 1.7.10).
What is chroot? It basically is an utility from unix which allows to have a separate system inside existing operating system (like a sandbox). It does not allow to run windows on linux, but instead allows to run a program almost completely separated from the main system. This is great if you do not want to worry about the program ruining your system.
Download (github must be whitelisted): pastebin run GWWCYEDH
Git repository: https://github.com/G.../systemc-nspawn
The code is licensed under MIT license, just like the original code written by Lymia Aluysia. This code has been updated to work on CraftOS 1.7. Credit goes to him/her for writing the original code.
Soon I will update this with more content, this will potentially become much bigger than just chroot.
- ComputerCraft | Programmable Computers for Minecraft
- → GreenByteSoftware's Content


