lua-obfuscator 1.0.4 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +59 -0
  2. package/dist/index.cjs +4552 -0
  3. package/dist/index.d.cts +399 -0
  4. package/dist/index.d.ts +397 -12
  5. package/dist/index.js +4505 -65
  6. package/package.json +24 -19
  7. package/.github/workflows/release.yml +0 -40
  8. package/dist/prometheus/LICENSE +0 -661
  9. package/dist/prometheus/benchmark.lua +0 -34
  10. package/dist/prometheus/build.bat +0 -10
  11. package/dist/prometheus/cli.lua +0 -12
  12. package/dist/prometheus/doc/README.md +0 -11
  13. package/dist/prometheus/doc/SUMMARY.md +0 -27
  14. package/dist/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +0 -31
  15. package/dist/prometheus/doc/getting-started/command-line-options.md +0 -13
  16. package/dist/prometheus/doc/getting-started/installation.md +0 -11
  17. package/dist/prometheus/doc/getting-started/obfuscating-your-first-script.md +0 -50
  18. package/dist/prometheus/doc/getting-started/presets.md +0 -10
  19. package/dist/prometheus/doc/getting-started/the-config-object.md +0 -58
  20. package/dist/prometheus/doc/getting-started/writing-a-custom-config-file.md +0 -56
  21. package/dist/prometheus/doc/steps/anti-tamper.md +0 -11
  22. package/dist/prometheus/doc/steps/constantarray.md +0 -71
  23. package/dist/prometheus/doc/steps/encryptstrings.md +0 -86
  24. package/dist/prometheus/doc/steps/proxifylocals.md +0 -47
  25. package/dist/prometheus/doc/steps/splitstrings.md +0 -40
  26. package/dist/prometheus/doc/steps/vmify.md +0 -9
  27. package/dist/prometheus/doc/steps/wrapinfunction.md +0 -29
  28. package/dist/prometheus/prometheus-main.lua +0 -1
  29. package/dist/prometheus/readme.md +0 -57
  30. package/dist/prometheus/readme.txt +0 -5
  31. package/dist/prometheus/src/cli.lua +0 -154
  32. package/dist/prometheus/src/colors.lua +0 -61
  33. package/dist/prometheus/src/config.lua +0 -35
  34. package/dist/prometheus/src/highlightlua.lua +0 -61
  35. package/dist/prometheus/src/logger.lua +0 -62
  36. package/dist/prometheus/src/presets.lua +0 -174
  37. package/dist/prometheus/src/prometheus/ast.lua +0 -792
  38. package/dist/prometheus/src/prometheus/bit.lua +0 -521
  39. package/dist/prometheus/src/prometheus/compiler/compiler.lua +0 -2365
  40. package/dist/prometheus/src/prometheus/enums.lua +0 -106
  41. package/dist/prometheus/src/prometheus/namegenerators/Il.lua +0 -41
  42. package/dist/prometheus/src/prometheus/namegenerators/confuse.lua +0 -169
  43. package/dist/prometheus/src/prometheus/namegenerators/mangled.lua +0 -26
  44. package/dist/prometheus/src/prometheus/namegenerators/mangled_shuffled.lua +0 -35
  45. package/dist/prometheus/src/prometheus/namegenerators/number.lua +0 -11
  46. package/dist/prometheus/src/prometheus/namegenerators.lua +0 -7
  47. package/dist/prometheus/src/prometheus/parser.lua +0 -969
  48. package/dist/prometheus/src/prometheus/pipeline.lua +0 -250
  49. package/dist/prometheus/src/prometheus/randomLiterals.lua +0 -41
  50. package/dist/prometheus/src/prometheus/randomStrings.lua +0 -24
  51. package/dist/prometheus/src/prometheus/scope.lua +0 -332
  52. package/dist/prometheus/src/prometheus/step.lua +0 -79
  53. package/dist/prometheus/src/prometheus/steps/AddVararg.lua +0 -33
  54. package/dist/prometheus/src/prometheus/steps/AntiTamper.lua +0 -194
  55. package/dist/prometheus/src/prometheus/steps/ConstantArray.lua +0 -521
  56. package/dist/prometheus/src/prometheus/steps/EncryptStrings.lua +0 -239
  57. package/dist/prometheus/src/prometheus/steps/NumbersToExpressions.lua +0 -82
  58. package/dist/prometheus/src/prometheus/steps/ProxifyLocals.lua +0 -313
  59. package/dist/prometheus/src/prometheus/steps/SplitStrings.lua +0 -338
  60. package/dist/prometheus/src/prometheus/steps/Vmify.lua +0 -30
  61. package/dist/prometheus/src/prometheus/steps/Watermark.lua +0 -61
  62. package/dist/prometheus/src/prometheus/steps/WatermarkCheck.lua +0 -50
  63. package/dist/prometheus/src/prometheus/steps/WrapInFunction.lua +0 -45
  64. package/dist/prometheus/src/prometheus/steps.lua +0 -12
  65. package/dist/prometheus/src/prometheus/tokenizer.lua +0 -546
  66. package/dist/prometheus/src/prometheus/unparser.lua +0 -866
  67. package/dist/prometheus/src/prometheus/util.lua +0 -297
  68. package/dist/prometheus/src/prometheus/visitast.lua +0 -245
  69. package/dist/prometheus/src/prometheus.lua +0 -71
  70. package/dist/prometheus/tests/closures.lua +0 -12
  71. package/dist/prometheus/tests/fibonacci.lua +0 -10
  72. package/dist/prometheus/tests/loops.lua +0 -8
  73. package/dist/prometheus/tests/primes.lua +0 -18
  74. package/dist/prometheus/tests.lua +0 -149
  75. package/src/index.ts +0 -100
  76. package/tsconfig.json +0 -13
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # lua-obfuscator
2
+
3
+ A powerful Lua / Luau obfuscator with VM-based protection.
4
+
5
+ `lua-obfuscator` is a modern, high-quality obfuscation tool designed for Lua and Luau (especially for Roblox, FiveM, and standalone Lua projects). It features a custom VM (Vmify) to significantly raise reverse engineering difficulty.
6
+
7
+ ---
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install lua-obfuscator
13
+ # or
14
+ yarn add lua-obfuscator
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { obfuscate } from 'lua-obfuscator';
21
+
22
+ const source = `
23
+ local function factorial(n)
24
+ if n <= 1 then return 1 end
25
+ return n * factorial(n - 1)
26
+ end
27
+
28
+ print(factorial(10))
29
+ `;
30
+
31
+ const obfuscated = obfuscate(source, "luaU", {
32
+ steps: [
33
+ { name: "InsertJunk" },
34
+ { name: "RenameVariables" },
35
+ { name: "Vmify" },
36
+ { name: "ConstantArray" },
37
+ { name: "GlobalMapping" },
38
+ { name: "StringsToExpressions" },
39
+ { name: "NumbersToExpressions" },
40
+ { name: "EncryptStrings" },
41
+ { name: "WrapInFunction" },
42
+ ],
43
+ minify: true,
44
+ });
45
+
46
+ console.log(obfuscated);
47
+ ```
48
+
49
+ ## Features
50
+ | Feature | Description |
51
+ | InsertJunk | Insert Junk Statements |
52
+ | RenameVariables | Rename Variables To random String |
53
+ | Vmify | Advanced custom VM (bytecode + interpreter) — the core strength |
54
+ | ConstantArray | Constant Array |
55
+ | GlobalMapping | Maps Globals (such as print, _G) to a {[randomId]=Global} table |
56
+ | StringsToExpressions | Make Strings Such as "abc" to "a" .. "b" .. "c" |
57
+ | NumbersToExpressions | Make Numbers Such as 1 to 3 + 200 - 202 |
58
+ | EncryptStrings | Encrypt Strings With XOR |
59
+ | WrapInFunction | Wraps The Whole Codes in a IIFE |