lua-obfuscator 1.0.0 → 1.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 (98) hide show
  1. package/.github/workflows/release.yml +40 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +18 -14
  4. package/dist/prometheus/LICENSE +661 -661
  5. package/dist/prometheus/build.bat +9 -9
  6. package/dist/prometheus/doc/README.md +11 -11
  7. package/dist/prometheus/doc/SUMMARY.md +27 -27
  8. package/dist/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +31 -31
  9. package/dist/prometheus/doc/getting-started/command-line-options.md +13 -13
  10. package/dist/prometheus/doc/getting-started/installation.md +11 -11
  11. package/dist/prometheus/doc/getting-started/obfuscating-your-first-script.md +50 -50
  12. package/dist/prometheus/doc/getting-started/presets.md +10 -10
  13. package/dist/prometheus/doc/getting-started/the-config-object.md +58 -58
  14. package/dist/prometheus/doc/getting-started/writing-a-custom-config-file.md +56 -56
  15. package/dist/prometheus/doc/steps/anti-tamper.md +11 -11
  16. package/dist/prometheus/doc/steps/constantarray.md +71 -71
  17. package/dist/prometheus/doc/steps/encryptstrings.md +86 -86
  18. package/dist/prometheus/doc/steps/proxifylocals.md +47 -47
  19. package/dist/prometheus/doc/steps/splitstrings.md +40 -40
  20. package/dist/prometheus/doc/steps/vmify.md +9 -9
  21. package/dist/prometheus/doc/steps/wrapinfunction.md +29 -29
  22. package/dist/prometheus/readme.md +57 -57
  23. package/dist/prometheus/readme.txt +4 -4
  24. package/package.json +5 -1
  25. package/src/index.ts +81 -75
  26. package/tsconfig.json +12 -12
  27. package/src/prometheus/.editorconfig +0 -4
  28. package/src/prometheus/.gitattributes +0 -2
  29. package/src/prometheus/.gitbook.yaml +0 -1
  30. package/src/prometheus/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
  31. package/src/prometheus/.github/workflows/Build.yml +0 -49
  32. package/src/prometheus/.github/workflows/Test.yml +0 -19
  33. package/src/prometheus/LICENSE +0 -661
  34. package/src/prometheus/benchmark.lua +0 -34
  35. package/src/prometheus/build.bat +0 -10
  36. package/src/prometheus/cli.lua +0 -12
  37. package/src/prometheus/doc/README.md +0 -11
  38. package/src/prometheus/doc/SUMMARY.md +0 -27
  39. package/src/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +0 -31
  40. package/src/prometheus/doc/getting-started/command-line-options.md +0 -13
  41. package/src/prometheus/doc/getting-started/installation.md +0 -11
  42. package/src/prometheus/doc/getting-started/obfuscating-your-first-script.md +0 -50
  43. package/src/prometheus/doc/getting-started/presets.md +0 -10
  44. package/src/prometheus/doc/getting-started/the-config-object.md +0 -58
  45. package/src/prometheus/doc/getting-started/writing-a-custom-config-file.md +0 -56
  46. package/src/prometheus/doc/steps/anti-tamper.md +0 -11
  47. package/src/prometheus/doc/steps/constantarray.md +0 -71
  48. package/src/prometheus/doc/steps/encryptstrings.md +0 -86
  49. package/src/prometheus/doc/steps/proxifylocals.md +0 -47
  50. package/src/prometheus/doc/steps/splitstrings.md +0 -40
  51. package/src/prometheus/doc/steps/vmify.md +0 -9
  52. package/src/prometheus/doc/steps/wrapinfunction.md +0 -29
  53. package/src/prometheus/prometheus-main.lua +0 -1
  54. package/src/prometheus/readme.md +0 -57
  55. package/src/prometheus/readme.txt +0 -5
  56. package/src/prometheus/src/cli.lua +0 -154
  57. package/src/prometheus/src/colors.lua +0 -61
  58. package/src/prometheus/src/highlightlua.lua +0 -61
  59. package/src/prometheus/src/logger.lua +0 -62
  60. package/src/prometheus/src/presets.lua +0 -174
  61. package/src/prometheus/src/prometheus/ast.lua +0 -792
  62. package/src/prometheus/src/prometheus/bit.lua +0 -521
  63. package/src/prometheus/src/prometheus/compiler/compiler.lua +0 -2365
  64. package/src/prometheus/src/prometheus/enums.lua +0 -106
  65. package/src/prometheus/src/prometheus/namegenerators/Il.lua +0 -41
  66. package/src/prometheus/src/prometheus/namegenerators/confuse.lua +0 -169
  67. package/src/prometheus/src/prometheus/namegenerators/mangled.lua +0 -26
  68. package/src/prometheus/src/prometheus/namegenerators/mangled_shuffled.lua +0 -35
  69. package/src/prometheus/src/prometheus/namegenerators/number.lua +0 -11
  70. package/src/prometheus/src/prometheus/namegenerators.lua +0 -7
  71. package/src/prometheus/src/prometheus/parser.lua +0 -969
  72. package/src/prometheus/src/prometheus/pipeline.lua +0 -250
  73. package/src/prometheus/src/prometheus/randomLiterals.lua +0 -41
  74. package/src/prometheus/src/prometheus/randomStrings.lua +0 -24
  75. package/src/prometheus/src/prometheus/scope.lua +0 -332
  76. package/src/prometheus/src/prometheus/step.lua +0 -79
  77. package/src/prometheus/src/prometheus/steps/AddVararg.lua +0 -33
  78. package/src/prometheus/src/prometheus/steps/AntiTamper.lua +0 -194
  79. package/src/prometheus/src/prometheus/steps/ConstantArray.lua +0 -521
  80. package/src/prometheus/src/prometheus/steps/EncryptStrings.lua +0 -239
  81. package/src/prometheus/src/prometheus/steps/NumbersToExpressions.lua +0 -82
  82. package/src/prometheus/src/prometheus/steps/ProxifyLocals.lua +0 -313
  83. package/src/prometheus/src/prometheus/steps/SplitStrings.lua +0 -338
  84. package/src/prometheus/src/prometheus/steps/Vmify.lua +0 -30
  85. package/src/prometheus/src/prometheus/steps/Watermark.lua +0 -61
  86. package/src/prometheus/src/prometheus/steps/WatermarkCheck.lua +0 -50
  87. package/src/prometheus/src/prometheus/steps/WrapInFunction.lua +0 -45
  88. package/src/prometheus/src/prometheus/steps.lua +0 -12
  89. package/src/prometheus/src/prometheus/tokenizer.lua +0 -546
  90. package/src/prometheus/src/prometheus/unparser.lua +0 -866
  91. package/src/prometheus/src/prometheus/util.lua +0 -297
  92. package/src/prometheus/src/prometheus/visitast.lua +0 -245
  93. package/src/prometheus/src/prometheus.lua +0 -71
  94. package/src/prometheus/tests/closures.lua +0 -12
  95. package/src/prometheus/tests/fibonacci.lua +0 -10
  96. package/src/prometheus/tests/loops.lua +0 -8
  97. package/src/prometheus/tests/primes.lua +0 -18
  98. package/src/prometheus/tests.lua +0 -149
@@ -1,106 +0,0 @@
1
- -- This Script is Part of the Prometheus Obfuscator by Levno_710
2
- --
3
- -- enums.lua
4
- -- This file Provides some enums used by the Obfuscator
5
-
6
- local Enums = {};
7
-
8
- local chararray = require("prometheus.util").chararray;
9
-
10
- Enums.LuaVersion = {
11
- LuaU = "LuaU" ,
12
- Lua51 = "Lua51",
13
- }
14
-
15
- Enums.Conventions = {
16
- [Enums.LuaVersion.Lua51] = {
17
- Keywords = {
18
- "and", "break", "do", "else", "elseif",
19
- "end", "false", "for", "function", "if",
20
- "in", "local", "nil", "not", "or",
21
- "repeat", "return", "then", "true", "until", "while"
22
- },
23
-
24
- SymbolChars = chararray("+-*/%^#=~<>(){}[];:,."),
25
- MaxSymbolLength = 3,
26
- Symbols = {
27
- "+", "-", "*", "/", "%", "^", "#",
28
- "==", "~=", "<=", ">=", "<", ">", "=",
29
- "(", ")", "{", "}", "[", "]",
30
- ";", ":", ",", ".", "..", "...",
31
- },
32
-
33
- IdentChars = chararray("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"),
34
- NumberChars = chararray("0123456789"),
35
- HexNumberChars = chararray("0123456789abcdefABCDEF"),
36
- BinaryNumberChars = {"0", "1"},
37
- DecimalExponent = {"e", "E"},
38
- HexadecimalNums = {"x", "X"},
39
- BinaryNums = {"b", "B"},
40
- DecimalSeperators = false,
41
-
42
- EscapeSequences = {
43
- ["a"] = "\a";
44
- ["b"] = "\b";
45
- ["f"] = "\f";
46
- ["n"] = "\n";
47
- ["r"] = "\r";
48
- ["t"] = "\t";
49
- ["v"] = "\v";
50
- ["\\"] = "\\";
51
- ["\""] = "\"";
52
- ["\'"] = "\'";
53
- },
54
- NumericalEscapes = true,
55
- EscapeZIgnoreNextWhitespace = true,
56
- HexEscapes = true,
57
- UnicodeEscapes = true,
58
- },
59
- [Enums.LuaVersion.LuaU] = {
60
- Keywords = {
61
- "and", "break", "do", "else", "elseif", "continue",
62
- "end", "false", "for", "function", "if",
63
- "in", "local", "nil", "not", "or",
64
- "repeat", "return", "then", "true", "until", "while"
65
- },
66
-
67
- SymbolChars = chararray("+-*/%^#=~<>(){}[];:,."),
68
- MaxSymbolLength = 3,
69
- Symbols = {
70
- "+", "-", "*", "/", "%", "^", "#",
71
- "==", "~=", "<=", ">=", "<", ">", "=",
72
- "+=", "-=", "/=", "%=", "^=", "..=", "*=",
73
- "(", ")", "{", "}", "[", "]",
74
- ";", ":", ",", ".", "..", "...",
75
- "::", "->", "?", "|", "&",
76
- },
77
-
78
- IdentChars = chararray("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"),
79
- NumberChars = chararray("0123456789"),
80
- HexNumberChars = chararray("0123456789abcdefABCDEF"),
81
- BinaryNumberChars = {"0", "1"},
82
- DecimalExponent = {"e", "E"},
83
- HexadecimalNums = {"x", "X"},
84
- BinaryNums = {"b", "B"},
85
- DecimalSeperators = {"_"},
86
-
87
- EscapeSequences = {
88
- ["a"] = "\a";
89
- ["b"] = "\b";
90
- ["f"] = "\f";
91
- ["n"] = "\n";
92
- ["r"] = "\r";
93
- ["t"] = "\t";
94
- ["v"] = "\v";
95
- ["\\"] = "\\";
96
- ["\""] = "\"";
97
- ["\'"] = "\'";
98
- },
99
- NumericalEscapes = true,
100
- EscapeZIgnoreNextWhitespace = true,
101
- HexEscapes = true,
102
- UnicodeEscapes = true,
103
- },
104
- }
105
-
106
- return Enums;
@@ -1,41 +0,0 @@
1
- -- This Script is Part of the Prometheus Obfuscator by Levno_710
2
- --
3
- -- namegenerators/il.lua
4
- --
5
- -- This Script provides a function for generation of weird names consisting of I, l and 1
6
-
7
- local MIN_CHARACTERS = 5;
8
- local MAX_INITIAL_CHARACTERS = 10;
9
-
10
-
11
- local util = require("prometheus.util");
12
- local chararray = util.chararray;
13
-
14
- local offset = 0;
15
- local VarDigits = chararray("Il1");
16
- local VarStartDigits = chararray("Il");
17
-
18
- local function generateName(id, scope)
19
- local name = ''
20
- id = id + offset;
21
- local d = id % #VarStartDigits
22
- id = (id - d) / #VarStartDigits
23
- name = name..VarStartDigits[d+1]
24
- while id > 0 do
25
- local d = id % #VarDigits
26
- id = (id - d) / #VarDigits
27
- name = name..VarDigits[d+1]
28
- end
29
- return name
30
- end
31
-
32
- local function prepare(ast)
33
- util.shuffle(VarDigits);
34
- util.shuffle(VarStartDigits);
35
- offset = math.random(3 ^ MIN_CHARACTERS, 3 ^ MAX_INITIAL_CHARACTERS);
36
- end
37
-
38
- return {
39
- generateName = generateName,
40
- prepare = prepare
41
- };
@@ -1,169 +0,0 @@
1
- -- This Script is Part of the Prometheus Obfuscator by Levno_710
2
- --
3
- -- namegenerators/confuse.lua
4
- --
5
- -- This Script provides a function for generation of confusing variable names
6
-
7
- local util = require("prometheus.util");
8
- local chararray = util.chararray;
9
-
10
- local varNames = {
11
- "index",
12
- "iterator",
13
- "length",
14
- "size",
15
- "key",
16
- "value",
17
- "data",
18
- "count",
19
- "increment",
20
- "include",
21
- "string",
22
- "number",
23
- "type",
24
- "void",
25
- "int",
26
- "float",
27
- "bool",
28
- "char",
29
- "double",
30
- "long",
31
- "short",
32
- "unsigned",
33
- "signed",
34
- "program",
35
- "factory",
36
- "Factory",
37
- "new",
38
- "delete",
39
- "table",
40
- "array",
41
- "object",
42
- "class",
43
- "arr",
44
- "obj",
45
- "cls",
46
- "dir",
47
- "directory",
48
- "isWindows",
49
- "isLinux",
50
- "game",
51
- "roblox",
52
- "gmod",
53
- "gsub",
54
- "gmatch",
55
- "gfind",
56
- "onload",
57
- "load",
58
- "loadstring",
59
- "loadfile",
60
- "dofile",
61
- "require",
62
- "parse",
63
- "byte",
64
- "code",
65
- "bytecode",
66
- "idx",
67
- "const",
68
- "loader",
69
- "loaders",
70
- "module",
71
- "export",
72
- "exports",
73
- "import",
74
- "imports",
75
- "package",
76
- "packages",
77
- "_G",
78
- "math",
79
- "os",
80
- "io",
81
- "write",
82
- "print",
83
- "read",
84
- "readline",
85
- "readlines",
86
- "close",
87
- "flush",
88
- "open",
89
- "popen",
90
- "tmpfile",
91
- "tmpname",
92
- "rename",
93
- "remove",
94
- "seek",
95
- "setvbuf",
96
- "lines",
97
- "call",
98
- "apply",
99
- "raise",
100
- "pcall",
101
- "xpcall",
102
- "coroutine",
103
- "create",
104
- "resume",
105
- "status",
106
- "wrap",
107
- "yield",
108
- "debug",
109
- "traceback",
110
- "getinfo",
111
- "getlocal",
112
- "setlocal",
113
- "getupvalue",
114
- "setupvalue",
115
- "getuservalue",
116
- "setuservalue",
117
- "upvalueid",
118
- "upvaluejoin",
119
- "sethook",
120
- "gethook",
121
- "hookfunction",
122
- "hooks",
123
- "error",
124
- "setmetatable",
125
- "getmetatable",
126
- "rand",
127
- "randomseed",
128
- "next",
129
- "ipairs",
130
- "hasnext",
131
- "loadlib",
132
- "searchpath",
133
- "oldpath",
134
- "newpath",
135
- "path",
136
- "rawequal",
137
- "rawset",
138
- "rawget",
139
- "rawnew",
140
- "rawlen",
141
- "select",
142
- "tonumber",
143
- "tostring",
144
- "assert",
145
- "collectgarbage",
146
- "a", "b", "c", "i", "j", "m",
147
- }
148
-
149
- local function generateName(id, scope)
150
- local name = {};
151
- local d = id % #varNames
152
- id = (id - d) / #varNames
153
- table.insert(name, varNames[d + 1]);
154
- while id > 0 do
155
- local d = id % #varNames
156
- id = (id - d) / #varNames
157
- table.insert(name, varNames[d + 1]);
158
- end
159
- return table.concat(name, "_");
160
- end
161
-
162
- local function prepare(ast)
163
- util.shuffle(varNames);
164
- end
165
-
166
- return {
167
- generateName = generateName,
168
- prepare = prepare
169
- };
@@ -1,26 +0,0 @@
1
- -- This Script is Part of the Prometheus Obfuscator by Levno_710
2
- --
3
- -- namegenerators/mangled.lua
4
- --
5
- -- This Script provides a function for generation of mangled names
6
-
7
-
8
- local util = require("prometheus.util");
9
- local chararray = util.chararray;
10
-
11
- local idGen = 0
12
- local VarDigits = chararray("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_");
13
- local VarStartDigits = chararray("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
14
-
15
- return function(id, scope)
16
- local name = ''
17
- local d = id % #VarStartDigits
18
- id = (id - d) / #VarStartDigits
19
- name = name..VarStartDigits[d+1]
20
- while id > 0 do
21
- local d = id % #VarDigits
22
- id = (id - d) / #VarDigits
23
- name = name..VarDigits[d+1]
24
- end
25
- return name
26
- end
@@ -1,35 +0,0 @@
1
- -- This Script is Part of the Prometheus Obfuscator by Levno_710
2
- --
3
- -- namegenerators/mangled_shuffled.lua
4
- --
5
- -- This Script provides a function for generation of mangled names with shuffled character order
6
-
7
-
8
- local util = require("prometheus.util");
9
- local chararray = util.chararray;
10
-
11
- local VarDigits = chararray("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_");
12
- local VarStartDigits = chararray("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
13
-
14
- local function generateName(id, scope)
15
- local name = ''
16
- local d = id % #VarStartDigits
17
- id = (id - d) / #VarStartDigits
18
- name = name..VarStartDigits[d+1]
19
- while id > 0 do
20
- local d = id % #VarDigits
21
- id = (id - d) / #VarDigits
22
- name = name..VarDigits[d+1]
23
- end
24
- return name
25
- end
26
-
27
- local function prepare(ast)
28
- util.shuffle(VarDigits);
29
- util.shuffle(VarStartDigits);
30
- end
31
-
32
- return {
33
- generateName = generateName,
34
- prepare = prepare
35
- };
@@ -1,11 +0,0 @@
1
- -- This Script is Part of the Prometheus Obfuscator by Levno_710
2
- --
3
- -- namegenerators/number.lua
4
- --
5
- -- This Script provides a function for generation of simple up counting names but with hex numbers
6
-
7
- local PREFIX = "_";
8
-
9
- return function(id, scope)
10
- return PREFIX .. tostring(id);
11
- end
@@ -1,7 +0,0 @@
1
- return {
2
- Mangled = require("prometheus.namegenerators.mangled");
3
- MangledShuffled = require("prometheus.namegenerators.mangled_shuffled");
4
- Il = require("prometheus.namegenerators.Il");
5
- Number = require("prometheus.namegenerators.number");
6
- Confuse = require("prometheus.namegenerators.confuse");
7
- }