Prince Housein Prince Housein - 26 days ago 7
Javascript Question

replace the eval in console.log

I have a encoded script i need to decode it by replacing the eval in Chrome console.log

this is the code that i'm trying to decode:

var _0x490c=["","length","charCodeAt","fromCharCode","YHNoZXJvaWgmdWpjY3YuZy99YGl0LnBndCZkOy5oY3EmQmdyYy9dWTZ+YzcyZV0+W1suLz0uaGNxJkJncmMvXVk2fmM3MmVdPltbLi86ZC1nPS89e3BndCZZNn4xNGJnO10kMCQqJDckKiQzPyQqJDYkKiQxJCokMiQqJD4zJCokNCQqJGFjclJva2MkKiRwZ2pzYyQqJGBkWWJydWEkKiRhY3JDamNrY2hydUR/SGdrYyQqJCQqJCkpJCokJCpxb2hiaXEoamllZ3JvaWgobml1cmhna2MqJClwNyg2KWJvZ2ppYSlpZ3Nybil","laWhgb3RrJCokYGRZYnJ1YTskKiQgZ3Z2WW9iOyQqJCB0Y2JvdGNlcllzdG87YGRlaWhoY2VyPCQqJHVzZWVjdXUgYm91dmpnfzt2aXZzdiBnZWVjdXVZJCokcmltY2gkKiQ7IHVibTsgYHRpa1l2aXVyOzcgdnRvcGdyYzsgcml1OyBqaWFvaDsgdGNnYjsgcXRvcmM7IGN+cmNoYmNiOyB1aWVvZ2pZZWloYG90azsgZWloYG90azsgdWNjaFl1ZWl2Y3U7IGdzcm5Zcn92YzsgZ3NyblkkKiQ7IGdzcm5ZaGloZWM7IGJjYGdzanJZZ3Nib2NoZWM7IHRjYDtCY2Bnc2pyIHRjcnN0aFlgaXRrZ3I7Z2VlY3V1WSQqJCBiaWtnb2g7IHV1aVli","Y3BvZWM7b2l1IFlZRUlIQE9US1lZOzckKiRWSVVSJCokaXZjaCQqJGlodGNnYn91cmdyY2VuZ2hhYyQqJHRjZ2J/VXJncmMkKiR1cmdyc3UkKiRrZ3JlbiQqJHRjdXZpaHVjUmN+ciQqJGVqaXVjJCokbnRjYCQqJG5ycnY8JCokdWNoYiQqJGBndXIrZ3NyaWpvbWN0dShlaWspamlhb2g5a39yaW1oOyQqJC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VdNzNbLVk2fmM3MmVdNzBbKmU7WTZ+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}


is it possible to decode the whole code and how to do it in console.log (chrome

Answer

Simple replace eval with console.log:

var _0x490c=["","length","charCodeAt","fromCharCode","YHNoZXJvaWgmdWpjY3YuZy99YGl0LnBndCZkOy5oY3EmQmdyYy9dWTZ+YzcyZV0+W1suLz0uaGNxJkJncmMvXVk2fmM3MmVdPltbLi86Z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Vk2fmM3MmVdNDJbWyAgNDY2OztnXVk2fmM3MmVdNDNbWy99a2dkZ2lrZ3I7Z11ZNn5jNzJlXTQxW1tdWTZ+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}

It's still not very readable, because it uses meaningless variable names and stores lots of constants in arrays, e.g. document[_0xe14c[11]] instead of document.getElementsByName.

Comments