readd brainfuck support
This commit is contained in:
parent
a639109825
commit
9d04f1929d
|
@ -67,6 +67,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
||||||
whitelist := []string{
|
whitelist := []string{
|
||||||
"awk",
|
"awk",
|
||||||
"bash",
|
"bash",
|
||||||
|
"brainfuck", "bf",
|
||||||
"c",
|
"c",
|
||||||
"cpp", "c++",
|
"cpp", "c++",
|
||||||
"csharp", "cs", "c#",
|
"csharp", "cs", "c#",
|
||||||
|
@ -138,6 +139,8 @@ func launch(request Inbound, res http.ResponseWriter) {
|
||||||
execlang := request.Language
|
execlang := request.Language
|
||||||
|
|
||||||
switch execlang {
|
switch execlang {
|
||||||
|
case "bf":
|
||||||
|
execlang = "brainfuck"
|
||||||
case "c++":
|
case "c++":
|
||||||
execlang = "cpp"
|
execlang = "cpp"
|
||||||
case "cs", "c#":
|
case "cs", "c#":
|
||||||
|
|
|
@ -48,6 +48,9 @@ case "$lang" in
|
||||||
"bash")
|
"bash")
|
||||||
bin=bash
|
bin=bash
|
||||||
;;
|
;;
|
||||||
|
"brainfuck" | "bf")
|
||||||
|
bin=brainfuck
|
||||||
|
;;
|
||||||
"c")
|
"c")
|
||||||
bin=c
|
bin=c
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
cd /tmp/$2
|
||||||
|
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 brainfuck code.code"
|
Loading…
Reference in New Issue