Skip to content

Instantly share code, notes, and snippets.

@HaykoKoryun
Created September 12, 2017 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HaykoKoryun/b18a615b021f853425afd9f5ca65684e to your computer and use it in GitHub Desktop.
Save HaykoKoryun/b18a615b021f853425afd9f5ca65684e to your computer and use it in GitHub Desktop.
Evil eval
function Evil()
{
var instance = this;
var message = "now that is truly evil!";
instance.evil = function(code)
{
eval(code);
}
instance.output = function()
{
console.log(message);
}
}
var _evil = new Evil();
_evil.evil("message = 'now that is truly awesome!';");
_evil.output();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment