refactor: string matchAll compatibility

This commit is contained in:
Xmader 2020-11-19 17:58:13 -05:00
parent 17c1e877fb
commit 9818814a51
No known key found for this signature in database
GPG Key ID: A20B97FB9EB730E4
1 changed files with 3 additions and 1 deletions

View File

@ -35,8 +35,10 @@ const magicHookConstr = async (type: FileType) => {
const deObf = getObfuscationCtx(mod)
const authExp = m[1]
const reg = new RegExp(OBFUSCATED_REG)
let magic = ''
for (const r of authExp.matchAll(OBFUSCATED_REG)) {
let r: RegExpMatchArray | null
while ((r = reg.exec(authExp)) !== null) {
magic += deObf(+r[2], r[3])
}