ben-sb / obfuscator-io-deobfuscator

A deobfuscator for scripts obfuscated by Obfuscator.io
https://obf-io.deobfuscate.io
Apache License 2.0
275 stars 61 forks source link

Couldn't deobfuscate code that uses destructuring assignment #33

Closed h5mcbox closed 1 week ago

h5mcbox commented 3 weeks ago

Original code:

const [a,b]=["foo","bar"];
console.log(b)

Obfuscated code on obfuscator.io:

const _0x199db9=_0x3a07;function _0x3a07(_0x64bb85,_0x2febca){const _0x352cfd=_0x352c();return _0x3a07=function(_0x3a0785,_0x1295aa){_0x3a0785=_0x3a0785-0xaa;let _0x21a8a8=_0x352cfd[_0x3a0785];return _0x21a8a8;},_0x3a07(_0x64bb85,_0x2febca);}(function(_0x14ae97,_0x5a5e20){const _0x365fcb=_0x3a07,_0x533cee=_0x14ae97();while(!![]){try{const _0x244e10=-parseInt(_0x365fcb(0xaa))/0x1*(-parseInt(_0x365fcb(0xb6))/0x2)+parseInt(_0x365fcb(0xad))/0x3+-parseInt(_0x365fcb(0xb5))/0x4+-parseInt(_0x365fcb(0xaf))/0x5*(-parseInt(_0x365fcb(0xab))/0x6)+-parseInt(_0x365fcb(0xb3))/0x7+parseInt(_0x365fcb(0xb2))/0x8+-parseInt(_0x365fcb(0xb4))/0x9*(parseInt(_0x365fcb(0xac))/0xa);if(_0x244e10===_0x5a5e20)break;else _0x533cee['push'](_0x533cee['shift']());}catch(_0x2c81b3){_0x533cee['push'](_0x533cee['shift']());}}}(_0x352c,0xa001d));const [a,b]=[_0x199db9(0xae),_0x199db9(0xb0)];function _0x352c(){const _0xb18b5c=['86883LHGopt','633396KxopXV','9791200HOtfxX','1782447WNJRYr','foo','55derBRH','bar','log','2732288RHJgro','8704983GiPAxx','9eawILb','3120gnWOaX','18OAEkHe'];_0x352c=function(){return _0xb18b5c;};return _0x352c();}console[_0x199db9(0xb1)](b);

Result on obf-io.deobfuscate.io: image