readme and path fix

This commit is contained in:
Brian Seymour 2018-09-21 13:45:09 -05:00
parent bdab24e810
commit 3aba668aec
2 changed files with 28 additions and 5 deletions

View File

@ -17,8 +17,8 @@ if [ -z "$2" ]; then
fi fi
lang=$1 lang=$1
abs=$2 filepath=$(realpath $2)
file=$(basename $abs) file=$(basename $2)
bin= bin=
case "$lang" in case "$lang" in
@ -53,7 +53,7 @@ docker run \
--network none \ --network none \
--cpus=".5" \ --cpus=".5" \
--rm \ --rm \
-v $abs:/$file:ro \ -v $filepath:/$file:ro \
-v $dir/executors/python2:/executor_python2:ro \ -v $dir/executors/python2:/executor_python2:ro \
-v $dir/executors/python3:/executor_python3:ro \ -v $dir/executors/python3:/executor_python3:ro \
-v $dir/executors/ruby:/executor_ruby:ro \ -v $dir/executors/ruby:/executor_ruby:ro \
@ -62,6 +62,8 @@ docker run \
-v $dir/executors/cpp:/executor_cpp:ro \ -v $dir/executors/cpp:/executor_cpp:ro \
-v $dir/executors/go:/executor_go:ro \ -v $dir/executors/go:/executor_go:ro \
piston \ piston \
runuser -l runner -c "/$bin /$file $file 2>&1" runuser \
-l runner \
-c "/$bin /$file $file 2>&1"
rm -f /tmp/$file rm -f /tmp/$file

View File

@ -1 +1,22 @@
### piston ## Piston
This project is the underlying engine for running untrusted and possibly malicious code that originates
from from EMKC contests and challenges.
#### Installation
- Install Docker https://www.docker.com/get-started
- `git clone https://github.com/engineer-man/piston`
- `cd piston/docker`
- `./build`
#### Usage
- `docker/execute <lang> <path to file>`
#### Supported Languages
Currently python2, python3, c, c++, go, node, and ruby are supported.
#### License
Piston is licensed under the MIT license.