Add edge files.

This commit is contained in:
2024-11-22 19:34:59 +01:00
parent ef080a96b2
commit 7d42a35f7a
5 changed files with 98 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
"""
Install script for the Python jailer.
Version: 1.0.0-main1
Version: 0.2.0-alpha2
"""
import os
import shutil
@@ -63,7 +63,7 @@ if setup_posix.lower() == "y":
f.write(usrname)
f.close()
with open("./sys/procinfo", "a+") as f:
f.write("proc: vfs(/proc/)\nmgr: vfs(/proc/kcore)")
f.write("proc: vfs(/proc/)\nkernel: vfs(/proc/kcore)")
f.close()
with open("./proc/kcore", "a+") as f:
f.write("/sys/jail_mgr.py")
@@ -75,6 +75,7 @@ else:
os.mkdir("./usr")
os.mkdir("./proc")
os.mkdir(f"./home/{usrname}")
os.mkdir("./sys/krnl/")
print("Copying files...")
shutil.move("./main.py", "./sys/jail_mgr.py")
shutil.move("./sh.py", "./bin/shell.py")