-
Option name:
"lock.countermeasures" -
Option value:
string
Input / Output
This example showcases howCountermeasures transforms the code. Try it out by changing the input code and see changes apply in real-time.
Input.js
Crash Process
The default behavior is to crash the process This is done by an infinite loop to ensure the process becomes useless.Custom Callback
By setting countermeasures to a string, it can point to a callback to invoke when a lock is triggered. The countermeasures callback function can either be a local name or an external name. Examples:"onLockTriggered""window.onLockTriggered"
Local Name rules
- The function must be defined at the top-level of your program.
- The function must not rely on any scoped variables.
- The function cannot call functions outside it’s context.
Test your countermeasure
Domain Lock:
Try your code within DevTools while on another website.Time Lock:
Try setting your machine time to before or past the allowed range.Integrity:
Try changing a string within your code.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