Javascript
Eval
The eval
function is used to execute JavaScript code represented as a string. It is not recommended to use eval
because it can introduce security vulnerabilities.
eval('console.log("Hello, World!")');
// Hello, World!
We could do something like
eval('require("fs").readFileSync("/etc/passwd").toString()');