-
Option name:
"lock.tamperProtection" -
Option values:
true/false/Function
Input / Output
This example showcases howTamper Protection transforms the code. Try it out by changing the input code and see changes apply in real-time.
Input.js
Improves Global Concealing
Tamper Protection withGlobal Concealing can detect at runtime if certain global functions have been monkey-patched. The following code exemplifies this:
Native function check
fetch.toString() value:
Stealthy global
A directeval invocation can access the local scope, only if it has not been redefined.
Disallows Strict Mode
Tamper Protection requires the script to run in non-strict mode. Detection of the script in Strict Mode will be considered tampering. You can control the tampering response using thelock.countermeasures option.
Custom Implementation
options.lock.tamperProtection(fnName)
Control which functions are changed. Returns a boolean.
Usage Example
The provided code example will obfuscate the fileinput.js and write the output to a file named output.js.
Usage Example
Enabled In
- High Preset: No
- Medium Preset: No
- Low Preset: No