Created
January 2, 2015 23:52
-
-
Save nikoncode/059a311c5bd275beea9c to your computer and use it in GitHub Desktop.
depacker
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 depack(p) { | |
| if (p != "") { | |
| c = unescape(p); | |
| var _e = eval, | |
| s = "eval=function(v){c=v;};" + c + ";eval=_e;"; | |
| eval(s) | |
| } else { | |
| c = p | |
| }; | |
| return c | |
| } | |
| function unpack(arg) { | |
| var c = arg; | |
| var a = 5, | |
| x = 1; | |
| while (x < a) { | |
| c = unescape(c); | |
| if (/eval\(+function\(/.test(c)) { | |
| c = depack(c); | |
| x++ | |
| } else { | |
| break | |
| } | |
| }; | |
| c = unescape(c); | |
| return c; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment