Created
September 21, 2014 19:35
-
-
Save augusto-altman/a94d497c83c306749286 to your computer and use it in GitHub Desktop.
A javascript implementation of the eval function using the blob native api.
This file contains hidden or 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 magicEval(code){ | |
var script = document.createElement("script"); | |
script.src = URL.createObjectURL(new Blob([code], {type: 'text/javascript'})); | |
script.type = "text/javascript"; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment