String Splitting

Potency Medium
Resilience Medium
Cost Medium
Tags: string, splitting, obfuscation

Description

String Splitting splits your strings into multiple expressions. You can control the number of chunks on which the string will be splitted.

Code Annotation Example

// @jscrambler define stringSplitting {chunks: [2,4]} as ss
// @jscrambler enable ss

Example

The following example is a string literal:

"Hello";

The transformation splits the string into many strings:

var a = "He";
a += "ll";
a += "o";
a;

The chunks parameter affects the number of times a string will be divided.

Option Types

Name Required Default Value Description
chunks No [2,4] Number of string chunks per string.
freq No 0.5 Probability of applying the transformation when the node allows for the transformation to happen.
min No N/A Minimum number of times the transformation is applied to each JavaScript file. This number may still not be reached if there are not enough candidates to apply the transformation to.
max No -1 Maximum number of times the transformation is applied to each JavaScript file.

Browser Compatibility

Browser Compatible Versions Tested Versions Notes
Chrome 80+ 80+
Firefox 90+ 90+
Internet Explorer 8+ 8+
Microsoft Edge 116+ 116+
Safari 13.1+ 13.1+

API Parameters

Example:

{
  "keys": {
    "accessKey": "XXXXXX",
    "secretKey": "YYYYYY"
  },
  "applicationId": "ZZZZZZ",
  "params": [
    {
      "name": "stringSplitting",
      "options": {
        "chunks": [
          2,
          4
        ]
      }
    }
  ]
}