Skip to content

ryuusama09/Remote-Code-Execution-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation



RCE

A Code engine built to simplify remote code execution.

Gitter

CreditsFeaturesDownloadSetupSupport

Credits

The software has been developed using the following packages:

  • NodeJs
  • Express
  • Docker
  • Amazon-S3

Features

The general architecture of the engine image

Download

To download the project use the following command

#clone the project
$ git clone https://github.com/ryuusama09/Remote-Code-Execution-Engine.git

Setup

once the project is cloned on your local system , you need to install the dependencies. make sure you have Docker-Desktop

#installs dependencies
$ npm install 

once all the dependencies , make sure you have you set the file script.sh in worker/images as LF type in the text-editor of your choice. also make sure you have no docker-container running on port 7000
now we will setup the docker shared volume and build the rest of the application

# creates docker volume "shared"
$ docker volume create shared

# build images 
$ docker build --no-cache -t rce/spawner worker/images/cpp

# the above commands need to be executed only once while initially setting up the project
# engine trigger command
$ docker-compose up --build

After running all the commands step-wise , you should be able to see that servers for server, worker and rabbitmq should be running
image

Testing

for this you are required to have amazon-S3 subscription , where the input file and source code file are uploaded. the post requests need to be sent to http://localhost:7000/api/submit. the body contains :
  • "src" : amazon-s3-source-code-link
  • "stdin" : amazon-s3-input-file-link
  • "lang" : language of the source code

Example

Using postman , i will demonstrate the process

upon a valid submission , you would be able to see that the code has been successfully executed.
In the terminal , you should be able to see the output.
In future we plan to directly upolad the output file back to s3.

Support

Buy Me A Coffee
RCE is an emailware. If you liked the project and would like to comment about it or would like to suggest any improvements then contact me at shahh8138@gmail.com . All reviews are welcome ☺

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published