Skip to content

AmanGupta03/multilang

Repository files navigation

Introduction

  • It is docker based sandbox to run untrusted Javascript, PHP, Python scripts.
  • Currently support Python-3.8, Php-7.4, Node v14.0.0.

Installation

  • Navigate to multilang directory and execute setup.sh i.e run ./setup.sh

  • Add current user to docker group -:

    sudo groupadd docker
    sudo usermod -aG docker $(whoami) 
    newgrp docker 
    
  • Enable cgroup swapping,

  • Start server by node server.js

    • If everything has been setup correctly, you will see the following message on your terminal
      Running at http://0.0.0.0:8000
      

Supported OS

  • Ubuntu 16.04, 18.04 LTS

API Usage Examples

{
 "code":"a=$a  \n a; \n",
 "lang":"python",
 "vars":{"$a":2,"$b":3}
 }
{
   	"id":"5",
   	"varObj":["$a"],
   	"code":"<?php \n$value=$a; \n $a;?>",
   	"lang":"php"
   
}
{
    "id":"5",
    "vars":{"$a":2}	
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •