Global Variable Indirection
Potency Medium
Resilience Medium
Cost Medium
Tags: identifier
Description
Global Variable Indirection will create aliases for every global variable that is referenced in the code. This will make your code harder to track since someone, like an attacker, will find less familiar code.
Code Annotation Example
You can only use Global Variable Indirection with global annotations.
// @jscrambler global enable globalVariableIndirection
Note: For React-Native applications, you can not set Global Variable Indirection via annotations, once we need to exclude the platform-specific global variables (done automatically by the jscrambler-metro-plugin)
Option Types
Name | Required | Default Value | Description |
excludeList | No | [] | List of names defined by the user that mustn't be renamed. |
Browser Compatibility
Browser | Compatible Versions | Tested Versions | Notes |
Chrome | 80+ | 80+ | |
Firefox | 80+ | 80+ | |
Internet Explorer | 9+ | 8+ | |
Microsoft Edge | 108+ | 108+ | |
Safari | 12.1+ | 12.1+ | |
API Parameters
Example:
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "globalVariableIndirection",
"options": {
"excludeList": []
}
}
]
}