替换console.log中的eval

时间:2016-11-08 19:36:44

标签: javascript decode console.log

我有一个编码脚本,我需要通过替换Chrome console.log中的eval来解码它。

这是我尝试解码的代码:

var _0x490c=["","length","charCodeAt","fromCharCode","YHNoZXJvaWgmdWpjY3YuZy99YGl0LnBndCZkOy5oY3EmQmdyYy9dWTZ+YzcyZV0+W1suLz0uaGNxJkJncmMvXVk2fmM3MmVdPltbLi86ZC1nPS89e3BndCZZNn4xNGJnO10kMCQqJDckKiQzPyQqJDYkKiQxJCokMiQqJD4zJCokNCQqJGFjclJva2MkKiRwZ2pzYyQqJGBkWWJydWEkKiRhY3JDamNrY2hydUR/SGdrYyQqJCQqJCkpJCokJCpxb2hiaXEoamllZ3JvaWgobml1cmhna2MqJClwNyg2KWJvZ2ppYSlpZ3Nybil","laWhgb3RrJCokYGRZYnJ1YTskKiQgZ3Z2WW9iOyQqJCB0Y2JvdGNlcllzdG87YGRlaWhoY2VyPCQqJHVzZWVjdXUgYm91dmpnfzt2aXZzdiBnZWVjdXVZJCokcmltY2gkKiQ7IHVibTsgYHRpa1l2aXVyOzcgdnRvcGdyYzsgcml1OyBqaWFvaDsgdGNnYjsgcXRvcmM7IGN+cmNoYmNiOyB1aWVvZ2pZZWloYG90azsgZWloYG90azsgdWNjaFl1ZWl2Y3U7IGdzcm5Zcn92YzsgZ3NyblkkKiQ7IGdzcm5ZaGloZWM7IGJjYGdzanJZZ3Nib2NoZWM7IHRjYDtCY2Bnc2pyIHRjcnN0aFlgaXRrZ3I7Z2VlY3V1WSQqJCBiaWtnb2g7IHV1aVli","Y3BvZWM7b2l1IFlZRUlIQE9US1lZOzckKiRWSVVSJCokaXZjaCQqJGlodGNnYn91cmdyY2VuZ2hhYyQqJHRjZ2J/VXJncmMkKiR1cmdyc3UkKiRrZ3JlbiQqJHRjdXZpaHVjUmN+ciQqJGVqaXVjJCokbnRjYCQqJG5ycnY8JCokdWNoYiQqJGBndXIrZ3NyaWpvbWN0dShlaWspamlhb2g5a39yaW1oOyQq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MmVdNzNbLVk2fmM3MmVdNzBbKmU7WTZ+YzcyZV03MVstYGRZYnJ1YS1ZNn5jNzJlXTc+Wy1+b2ItWTZ+YzcyZV03P1stWTZ+YzcyZV03NVstWTZ+YzcyZV00Nls9Z11ZNn5jNzJlXTQ0W1suWTZ+YzcyZV00N1sqZConNi8qZ11ZNn5jNzJlXTQ1W1s7YHNoZXJvaWguL31vYC4yOztnXVk2fmM3MmVdNDJbWyAgNDY2OztnXVk2fmM3MmVdNDNbWy99a2dkZ2lrZ3I7Z11ZNn5jNzJlXTQxW1tdWTZ+YzcyZV00MFtbLilyaW1jaDsuKC0vICkvXTdbPXBndCZkO2tnZGdpa2dyPXVqY2N2LmJjamd/WXJva2MvKmppZWd","yb2loXVk2fmM3MmVdND9bWztZNn5jNzJlXTU2Wy1ZNn5jNzJlXTc1Wy1ZNn5jNzJlXTU3Wy1ke3sqZ11ZNn5jNzJlXTU0W1suZS97eypjXVk2fmM3MmVdNTRbWy5oLz0="];var _0xe28d=[_0x490c[0],_0x490c[1],_0x490c[2],_0x490c[3]];var _0x9c69=[_0xe28d[0],_0xe28d[1],_0xe28d[2],_0xe28d[3]];eval(_xyz____(_0x490c[4]+ _0x490c[5]+ _0x490c[6]+ _0x490c[7]+ _0x490c[8]+ _0x490c[9]+ _0x490c[10]+ _0x490c[11]+ _0x490c[12]));function _xyz____(_0x7c39x4){var _0x7c39x5=_0x9c69[0];var _0x7c39x6=atob(_0x7c39x4);var _0x7c39x7=6;for(i= 0;i< _0x7c39x6[_0x9c69[1]];i++){_0x7c39x5+= String[_0x9c69[3]](_0x7c39x7^ _0x7c39x6[_0x9c69[2]](i))};return _0x7c39x5}

是否可以解码整个代码以及如何在console.log中执行此操作(chrome

1 个答案:

答案 0 :(得分:0)

使用eval简单替换console.log

var _0x490c=["","length","charCodeAt","fromCharCode","YHNoZXJvaWgmdWpjY3YuZy99YGl0LnBndCZkOy5oY3EmQmdyYy9dWTZ+YzcyZV0+W1suLz0uaGNxJkJncmM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HNoZXJvaWguL31vYC4yOztnXVk2fmM3MmVdNDJbWyAgNDY2OztnXVk2fmM3MmVdNDNbWy99a2dkZ2lrZ3I7Z11ZNn5jNzJlXTQxW1tdWTZ+YzcyZV00MFtbLilyaW1jaDsuKC0vICkvXTdbPXBndCZkO2tnZGdpa2dyPXVqY2N2LmJjamd/WXJva2MvKmppZWd","yb2loXVk2fmM3MmVdND9bWztZNn5jNzJlXTU2Wy1ZNn5jNzJlXTc1Wy1ZNn5jNzJlXTU3Wy1ke3sqZ11ZNn5jNzJlXTU0W1suZS97eypjXVk2fmM3MmVdNTRbWy5oLz0="];var _0xe28d=[_0x490c[0],_0x490c[1],_0x490c[2],_0x490c[3]];var _0x9c69=[_0xe28d[0],_0xe28d[1],_0xe28d[2],_0xe28d[3]];console.log(_xyz____(_0x490c[4]+ _0x490c[5]+ _0x490c[6]+ _0x490c[7]+ _0x490c[8]+ _0x490c[9]+ _0x490c[10]+ _0x490c[11]+ _0x490c[12]));function _xyz____(_0x7c39x4){var _0x7c39x5=_0x9c69[0];var _0x7c39x6=atob(_0x7c39x4);var _0x7c39x7=6;for(i= 0;i< _0x7c39x6[_0x9c69[1]];i++){_0x7c39x5+= String[_0x9c69[3]](_0x7c39x7^ _0x7c39x6[_0x9c69[2]](i))};return _0x7c39x5}

它仍然不是很易读,因为它使用无意义的变量名并在数组中存储大量常量,例如document[_0xe14c[11]]代替document.getElementsByName