文档
/
基础混淆
/

字符串数组

字符串数组

stringArray
Recommended

stringArray 选项默认启用,是绝大多数混淆的基础。它会提取字符串字面量并将其放入一个特殊的数组中。

// Before
const message = "Hello World";
const endpoint = "/api/users";

// After (with stringArray)
const _0x1a2b = ['Hello World', '/api/users'];
const message = _0x1a2b[0x0];
const endpoint = _0x1a2b[0x1];

编码会对字符串进行编码,从而再增加一层保护:

  • none - 不编码,字符串按原样存储
  • base64 - 编码速度快,保护强度中等
  • rc4 - 保护更强,但运行时会慢约 30-50%