diff --git a/dzunlock.user.js b/dzunlock.user.js index daaca8a..bee93fe 100644 --- a/dzunlock.user.js +++ b/dzunlock.user.js @@ -3,7 +3,7 @@ // @namespace io.github.uhwot.dzunlock // @description enables deezer hifi features lol // @author uh wot -// @version 1.1.5 +// @version 1.1.6 // @license GPL-3.0-only // @homepageURL https://git.freezer.life/uhwot/dzunlock // @downloadURL https://git.freezer.life/uhwot/dzunlock/raw/branch/master/dzunlock.user.js @@ -100,10 +100,14 @@ function str2bin(str) { }) } +function bin2str(bin) { + return String.fromCharCode.apply(String, bin); +} + function decryptHex(hex, key) { hex = aesjs.utils.hex.toBytes(hex) let aesEcb = new aesjs.ModeOfOperation.ecb(key) - return aesjs.utils.utf8.fromBytes(aesEcb.decrypt(hex)).replace(/\0+$/, '') // removes zero-padding + return bin2str(aesEcb.decrypt(hex)).replace(/\0+$/, '') // removes zero-padding } function encryptHex(str, key) {