Replace array-mapped variables with the actual variable name/string?

前端 未结 3 2006
旧巷少年郎
旧巷少年郎 2020-12-31 14:25

I am trying to edit a Greasemonkey/jQuery script. I can\'t post the link here.
The code is obfuscated and compressed with minify.
It starts like this:



        
3条回答
  •  执念已碎
    2020-12-31 14:52

    for (var i = 0; i < _0x21e9.length; i++) {
      var funcName = _0x21e9[i];
      _0x21e9[funcName] = funcName;
    }
    

    this will add all the function names as keys to the array. allowing you to do

    date[_0x21e9["getMonth"]]()
    

提交回复
热议问题