Welcome to evalpark!

evalpark is an AJAX service which runs a given shell script. The result is returned in JSON with Access-Control-Allow-Origin: *.

http://eval.dan.co.jp/park.cgi?s=source
https://eval.dan.co.jp/park.cgi?s=source

Your script is run in a fully-featured FreeBSD 13 jail with resources capped by RACCT/RCTL. Unlike many web services like this, Evalpark lets you run fully-featured shell scripts with pipe(), fork() and exec(). Thanks to RACCT which now comes standard with FreeBSD 9, This degree of freedom was made possible safely and securely.

Script Archive

Available in /friends/. You can also rerun the script by prepending /park.cgi. For example:

/friends/sample/boilerplate.sh
Gives you its source.
/park.cgi/friends/sample/boilerplate.sh
Gives you the executed result.

In fact, any submitted scripts are stored in /friends/yyyy/mm/dd/${sha256_hash_of_the_content}. You can get the path via path field of the JSON.

jQuery Plugin

jQuery plugin is available so you can easily run your scripts in your web page like so:

<script src="//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="//eval.dan.co.jp/jquery-runpark.js"></script>
<div>
<textarea id="src" rows="4">
#!/bin/sh -v
pkg info | awk '{print $1}'
</textarea>
  <div>
    <input type="submit" value="run" onclick="$('#src').runPark('#dst')">
    <input type="submit" value="rerun" onclick="$('#dst').rerunPark('/friends/sample/pkg.sh')">
    <input type="submit" value="clear" onclick="$('#dst').html('')">
  </div>
  <div id="dst"></div>
</div>
jquery-runpark.js source is as follows:

  

NO WARRANTY

Whatsoever.

Enjoy!

Dan the Park Ranger

Acknowledgements