2024-10-06 18:19:52 -04:00
|
|
|
import os
|
|
|
|
print("[OS] Started up the kernel")
|
2024-10-06 18:29:39 -04:00
|
|
|
print("[Notice] If you have no internet you can barely use the os. run bash for more features btw, itll put you in linux")
|
2024-10-06 18:16:05 -04:00
|
|
|
print("[AutoLogin] Logged into user root")
|
2024-10-06 18:28:34 -04:00
|
|
|
os.system("mkdir /tmp/pyos > /dev/null")
|
|
|
|
os.system("echo [PyOS] We are the best os! > /tmp/pyos/readme.txt")
|
2024-10-06 18:16:05 -04:00
|
|
|
def hello():
|
|
|
|
print("Hello! You've activated the hello command.")
|
|
|
|
|
|
|
|
def help_command():
|
|
|
|
print("This is the help command. Use --help for assistance.")
|
2024-10-06 18:19:52 -04:00
|
|
|
def bash_command():
|
2024-10-06 18:21:14 -04:00
|
|
|
os.system("bash bash.sh")
|
2024-10-06 18:16:05 -04:00
|
|
|
def custom_terminal():
|
|
|
|
commands = {
|
|
|
|
"hello": hello,
|
2024-10-06 18:19:52 -04:00
|
|
|
"help": help_command,
|
|
|
|
"bash": bash_command
|
2024-10-06 18:16:05 -04:00
|
|
|
}
|
|
|
|
|
2024-10-06 18:21:41 -04:00
|
|
|
print("Welcome to your PyOS PC! Type 'exit' to quit.")
|
2024-10-06 18:16:05 -04:00
|
|
|
|
|
|
|
while True:
|
2024-10-06 18:19:52 -04:00
|
|
|
command = input("root@python $").strip()
|
2024-10-06 18:16:05 -04:00
|
|
|
|
|
|
|
if command == "exit":
|
|
|
|
break
|
|
|
|
elif command in commands:
|
|
|
|
commands[command]()
|
|
|
|
else:
|
|
|
|
print(f"Unknown command: {command}")
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
custom_terminal()
|