Tuesday, 9 May 2017

Nodejs inject virtual machine

I need to inject code that runs in nodejs virtual machine (vm module). I have modified require function, but it returns only allowed modules. Code of require function:

function (name){
    return modules.indexOf(name) > -1 ? require(name) : {};
}

Probably, we can inject modules required by this function. So, can we inject a virtual machine that it can run code outside of it?



via WildeMe

No comments:

Post a Comment