Created
September 12, 2017 21:23
-
-
Save HaykoKoryun/b18a615b021f853425afd9f5ca65684e to your computer and use it in GitHub Desktop.
Evil eval
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
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