refactor: string matchAll compatibility
This commit is contained in:
parent
17c1e877fb
commit
9818814a51
1 changed files with 3 additions and 1 deletions
|
@ -35,8 +35,10 @@ const magicHookConstr = async (type: FileType) => {
|
||||||
const deObf = getObfuscationCtx(mod)
|
const deObf = getObfuscationCtx(mod)
|
||||||
const authExp = m[1]
|
const authExp = m[1]
|
||||||
|
|
||||||
|
const reg = new RegExp(OBFUSCATED_REG)
|
||||||
let magic = ''
|
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])
|
magic += deObf(+r[2], r[3])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue