I'm creating an online judge, such as Spoj, UVa and others. I have my web part, which was made in PHP, where it is possible to submit the codes and I have a Python server that receives the same ones, executes the code and returns the program result (AC, WA, TLE, RTE) . But what I need now is to handle the incoming codes, so it is not possible to run the OS command. I did not want to have to go through the whole code and check if there is any function that I do not allow, because that would be a lot of work, because with every new language I added in my OJ, I would have to find out what the malicious functions are. p>
Any ideas how to do this?