added some more commands

This commit is contained in:
valentijn
2024-01-25 14:22:59 +01:00
parent d0fb604680
commit f6e8eda33c
4 changed files with 153 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ app.get("/execute", (req, res)=> {
if (raw_command == ""){
commands.customTextResponse(res, "");
return;
}
}a
const formatted_command = raw_command.trim();
const command = formatted_command.split(" ")[0]
@@ -29,6 +29,21 @@ app.get("/execute", (req, res)=> {
break;
case "ls":
commands.ls(res);
break;
case "whoami":
commands.whoami(res);
break;
case "cd":
commands.cd(res, formatted_command);
break;
case "pwd":
commands.pwd(res);
break;
case "cat":
commands.cat(res, formatted_command )
break;
case "help":
commands.help(res);
}
})