Skip to content

Commit

Permalink
obfuscator: Supports the case where DebugProtectionFunctionInterval i…
Browse files Browse the repository at this point in the history
…s customized #95

Signed-off-by: echo094 <[email protected]>
  • Loading branch information
echo094 committed Jun 8, 2024
1 parent 0d13d2d commit 478ced8
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/plugin/obfuscator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1283,15 +1283,21 @@ const deleteDebugProtectionCode = {
rm.remove()
continue
}
// DebugProtectionFunctionCall
const up2 = up1.getFunctionParent().parentPath
const scope2 = up2.scope.getBinding(callName).scope
up2.remove()
scope1.crawl()
scope2.crawl()
const bind = scope2.bindings[callName]
bind.path.remove()
console.info(`Remove CallFunc: ${callName}`)
const up2 = up1.getFunctionParent()?.parentPath
if (up2) {
// DebugProtectionFunctionCall
const scope2 = up2.scope.getBinding(callName).scope
up2.remove()
scope1.crawl()
scope2.crawl()
const bind = scope2.bindings[callName]
bind.path.remove()
console.info(`Remove CallFunc: ${callName}`)
continue
}
// exceptions #95
const rm = ref.parentPath
rm.remove()
}
path.remove()
console.info(`Remove DebugProtectionFunc: ${debugName}`)
Expand Down

0 comments on commit 478ced8

Please sign in to comment.