Stack: Flask, MongoDB
The server will execute the uploaded script when it is invoked but the server does not have a middleware to identify malicious scripts
You will be implementing a dynamic Python invoker REST service. The service will have the following features:
POST http://localhost:8000/api/v1/scripts
foo.py
# foo.py
print("Hello World")
curl -i -X POST -H "Content-Type: multipart/form-data"
-F "data=@/tmp/foo.py" http://localhost:8000/api/v1/scripts
201 Created
{
"script-id": "123456"
}
GET http://localhost:8000/api/v1/scripts/{script-id}
curl -i
http://localhost:8000/api/v1/scripts/123456
200 OK
Hello World