wrapeval
0.3.7 • Public • Published NO WARRANT WARNING
wrapeval
- wrap eval in sanbox;
- suggest to compile function and use later for performance
require('wrapeval')(`
console.log(Math.random())
`,{ console })
escape/hack cases
(function(){return this}())
this.constructor.constructor("return process")()
(function(){return this.constructor.constructor("return process")()}())
delete constructor.constructor;delete constructor;constructor.constructor('return process')()
delete constructor;constructor.constructor('return process')()
delete constructor;(function(){return this.constructor.constructor("return process")()}())
ref
http://perfectionkills.com/global-eval-what-are-the-options/#how_eval_works
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads