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.
- package/.github/workflows/release.yml +40 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -14
- package/dist/prometheus/LICENSE +661 -661
- package/dist/prometheus/build.bat +9 -9
- package/dist/prometheus/doc/README.md +11 -11
- package/dist/prometheus/doc/SUMMARY.md +27 -27
- package/dist/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +31 -31
- package/dist/prometheus/doc/getting-started/command-line-options.md +13 -13
- package/dist/prometheus/doc/getting-started/installation.md +11 -11
- package/dist/prometheus/doc/getting-started/obfuscating-your-first-script.md +50 -50
- package/dist/prometheus/doc/getting-started/presets.md +10 -10
- package/dist/prometheus/doc/getting-started/the-config-object.md +58 -58
- package/dist/prometheus/doc/getting-started/writing-a-custom-config-file.md +56 -56
- package/dist/prometheus/doc/steps/anti-tamper.md +11 -11
- package/dist/prometheus/doc/steps/constantarray.md +71 -71
- package/dist/prometheus/doc/steps/encryptstrings.md +86 -86
- package/dist/prometheus/doc/steps/proxifylocals.md +47 -47
- package/dist/prometheus/doc/steps/splitstrings.md +40 -40
- package/dist/prometheus/doc/steps/vmify.md +9 -9
- package/dist/prometheus/doc/steps/wrapinfunction.md +29 -29
- package/dist/prometheus/readme.md +57 -57
- package/dist/prometheus/readme.txt +4 -4
- package/package.json +5 -1
- package/src/index.ts +81 -75
- package/tsconfig.json +12 -12
- package/src/prometheus/.editorconfig +0 -4
- package/src/prometheus/.gitattributes +0 -2
- package/src/prometheus/.gitbook.yaml +0 -1
- package/src/prometheus/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
- package/src/prometheus/.github/workflows/Build.yml +0 -49
- package/src/prometheus/.github/workflows/Test.yml +0 -19
- package/src/prometheus/LICENSE +0 -661
- package/src/prometheus/benchmark.lua +0 -34
- package/src/prometheus/build.bat +0 -10
- package/src/prometheus/cli.lua +0 -12
- package/src/prometheus/doc/README.md +0 -11
- package/src/prometheus/doc/SUMMARY.md +0 -27
- package/src/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +0 -31
- package/src/prometheus/doc/getting-started/command-line-options.md +0 -13
- package/src/prometheus/doc/getting-started/installation.md +0 -11
- package/src/prometheus/doc/getting-started/obfuscating-your-first-script.md +0 -50
- package/src/prometheus/doc/getting-started/presets.md +0 -10
- package/src/prometheus/doc/getting-started/the-config-object.md +0 -58
- package/src/prometheus/doc/getting-started/writing-a-custom-config-file.md +0 -56
- package/src/prometheus/doc/steps/anti-tamper.md +0 -11
- package/src/prometheus/doc/steps/constantarray.md +0 -71
- package/src/prometheus/doc/steps/encryptstrings.md +0 -86
- package/src/prometheus/doc/steps/proxifylocals.md +0 -47
- package/src/prometheus/doc/steps/splitstrings.md +0 -40
- package/src/prometheus/doc/steps/vmify.md +0 -9
- package/src/prometheus/doc/steps/wrapinfunction.md +0 -29
- package/src/prometheus/prometheus-main.lua +0 -1
- package/src/prometheus/readme.md +0 -57
- package/src/prometheus/readme.txt +0 -5
- package/src/prometheus/src/cli.lua +0 -154
- package/src/prometheus/src/colors.lua +0 -61
- package/src/prometheus/src/highlightlua.lua +0 -61
- package/src/prometheus/src/logger.lua +0 -62
- package/src/prometheus/src/presets.lua +0 -174
- package/src/prometheus/src/prometheus/ast.lua +0 -792
- package/src/prometheus/src/prometheus/bit.lua +0 -521
- package/src/prometheus/src/prometheus/compiler/compiler.lua +0 -2365
- package/src/prometheus/src/prometheus/enums.lua +0 -106
- package/src/prometheus/src/prometheus/namegenerators/Il.lua +0 -41
- package/src/prometheus/src/prometheus/namegenerators/confuse.lua +0 -169
- package/src/prometheus/src/prometheus/namegenerators/mangled.lua +0 -26
- package/src/prometheus/src/prometheus/namegenerators/mangled_shuffled.lua +0 -35
- package/src/prometheus/src/prometheus/namegenerators/number.lua +0 -11
- package/src/prometheus/src/prometheus/namegenerators.lua +0 -7
- package/src/prometheus/src/prometheus/parser.lua +0 -969
- package/src/prometheus/src/prometheus/pipeline.lua +0 -250
- package/src/prometheus/src/prometheus/randomLiterals.lua +0 -41
- package/src/prometheus/src/prometheus/randomStrings.lua +0 -24
- package/src/prometheus/src/prometheus/scope.lua +0 -332
- package/src/prometheus/src/prometheus/step.lua +0 -79
- package/src/prometheus/src/prometheus/steps/AddVararg.lua +0 -33
- package/src/prometheus/src/prometheus/steps/AntiTamper.lua +0 -194
- package/src/prometheus/src/prometheus/steps/ConstantArray.lua +0 -521
- package/src/prometheus/src/prometheus/steps/EncryptStrings.lua +0 -239
- package/src/prometheus/src/prometheus/steps/NumbersToExpressions.lua +0 -82
- package/src/prometheus/src/prometheus/steps/ProxifyLocals.lua +0 -313
- package/src/prometheus/src/prometheus/steps/SplitStrings.lua +0 -338
- package/src/prometheus/src/prometheus/steps/Vmify.lua +0 -30
- package/src/prometheus/src/prometheus/steps/Watermark.lua +0 -61
- package/src/prometheus/src/prometheus/steps/WatermarkCheck.lua +0 -50
- package/src/prometheus/src/prometheus/steps/WrapInFunction.lua +0 -45
- package/src/prometheus/src/prometheus/steps.lua +0 -12
- package/src/prometheus/src/prometheus/tokenizer.lua +0 -546
- package/src/prometheus/src/prometheus/unparser.lua +0 -866
- package/src/prometheus/src/prometheus/util.lua +0 -297
- package/src/prometheus/src/prometheus/visitast.lua +0 -245
- package/src/prometheus/src/prometheus.lua +0 -71
- package/src/prometheus/tests/closures.lua +0 -12
- package/src/prometheus/tests/fibonacci.lua +0 -10
- package/src/prometheus/tests/loops.lua +0 -8
- package/src/prometheus/tests/primes.lua +0 -18
- package/src/prometheus/tests.lua +0 -149
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
print("PROMETHEUS Benchmark")
|
|
2
|
-
print("Based On IronBrew Benchmark")
|
|
3
|
-
local Iterations = 100000
|
|
4
|
-
print("Iterations: " .. tostring(Iterations))
|
|
5
|
-
|
|
6
|
-
print("CLOSURE testing.")
|
|
7
|
-
local Start = os.clock()
|
|
8
|
-
local TStart = Start
|
|
9
|
-
for Idx = 1, Iterations do
|
|
10
|
-
(function()
|
|
11
|
-
if not true then
|
|
12
|
-
print("Hey gamer.")
|
|
13
|
-
end
|
|
14
|
-
end)()
|
|
15
|
-
end
|
|
16
|
-
print("Time:", os.clock() - Start .. "s")
|
|
17
|
-
|
|
18
|
-
print("SETTABLE testing.")
|
|
19
|
-
Start = os.clock()
|
|
20
|
-
local T = {}
|
|
21
|
-
for Idx = 1, Iterations do
|
|
22
|
-
T[tostring(Idx)] = "EPIC GAMER " .. tostring(Idx)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
print("Time:", os.clock() - Start .. "s")
|
|
26
|
-
|
|
27
|
-
print("GETTABLE testing.")
|
|
28
|
-
Start = os.clock()
|
|
29
|
-
for Idx = 1, Iterations do
|
|
30
|
-
T[1] = T[tostring(Idx)]
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
print("Time:", os.clock() - Start .. "s")
|
|
34
|
-
print("Total Time:", os.clock() - TStart .. "s")
|
package/src/prometheus/build.bat
DELETED
package/src/prometheus/cli.lua
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
-- This Script is Part of the Prometheus Obfuscator by Levno_710
|
|
2
|
-
--
|
|
3
|
-
-- test.lua
|
|
4
|
-
-- This script contains the Code for the Prometheus CLI
|
|
5
|
-
|
|
6
|
-
-- Configure package.path for requiring Prometheus
|
|
7
|
-
local function script_path()
|
|
8
|
-
local str = debug.getinfo(2, "S").source:sub(2)
|
|
9
|
-
return str:match("(.*[/%\\])") or "";
|
|
10
|
-
end
|
|
11
|
-
package.path = script_path() .. "?.lua;" .. package.path;
|
|
12
|
-
require("src.cli");
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Prometheus is an Lua Obfuscator, that is written in pure Lua.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Prometheus
|
|
6
|
-
|
|
7
|
-
Prometheus can obfuscate Lua51 as well as Roblox's LuaU, which is an optionally typed superset of Lua51.
|
|
8
|
-
|
|
9
|
-
View Prometheus on [github](https://github.com/levno-710/Prometheus).
|
|
10
|
-
|
|
11
|
-
This Documentation only applies to the newest version of Prometheus.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Table of contents
|
|
2
|
-
|
|
3
|
-
* [Prometheus](README.md)
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
* [Installation](getting-started/installation.md)
|
|
8
|
-
* [Obfuscating your first script](getting-started/obfuscating-your-first-script.md)
|
|
9
|
-
* [Command Line Options](getting-started/command-line-options.md)
|
|
10
|
-
* [Presets](getting-started/presets.md)
|
|
11
|
-
* [Writing a custom Config File](getting-started/writing-a-custom-config-file.md)
|
|
12
|
-
* [The Config Object](getting-started/the-config-object.md)
|
|
13
|
-
|
|
14
|
-
## Steps
|
|
15
|
-
|
|
16
|
-
* [WrapInFunction](steps/wrapinfunction.md)
|
|
17
|
-
* [Vmify](steps/vmify.md)
|
|
18
|
-
* [SplitStrings](steps/splitstrings.md)
|
|
19
|
-
* [ProxifyLocals](steps/proxifylocals.md)
|
|
20
|
-
* [EncryptStrings](steps/encryptstrings.md)
|
|
21
|
-
* [ConstantArray](steps/constantarray.md)
|
|
22
|
-
* [AntiTamper](steps/anti-tamper.md)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## advanced
|
|
26
|
-
|
|
27
|
-
* [Using Prometheus in your Lua Application](advanced/using-prometheus-in-your-lua-application.md)
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Using Prometheus in your Lua Application
|
|
2
|
-
|
|
3
|
-
Prometheus can also be used as a library for your custom Lua Applications instead of using its cli tool. 
|
|
4
|
-
|
|
5
|
-
In order to do that you'll first need to clone the github repo:
|
|
6
|
-
|
|
7
|
-
```batch
|
|
8
|
-
git clone "https://github.com/levno-710/Prometheus.git"
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
After that, you'll need to copy everything within the src folder to your project. Let's say you created a folder named `prometheus`, where all the Prometheus files are located. You can the use the following code to obfuscate a string:
|
|
12
|
-
|
|
13
|
-
{% code title="use_prometheus.lua" %}
|
|
14
|
-
```lua
|
|
15
|
-
local Prometheus = require("prometheus.prometheus")
|
|
16
|
-
|
|
17
|
-
-- If you don't want console output
|
|
18
|
-
Prometheus.Logger.logLevel = Prometheus.Logger.LogLevel.Error
|
|
19
|
-
|
|
20
|
-
-- Your code
|
|
21
|
-
local code = 'print("Hello, World!")'
|
|
22
|
-
|
|
23
|
-
-- Create a Pipeline using the Strong preset
|
|
24
|
-
local pipeline = Prometheus.Pipeline:fromConfig(Prometheus.Presets.Strong)
|
|
25
|
-
|
|
26
|
-
-- Apply the obfuscation and print the result
|
|
27
|
-
print(pipeline:apply(code));
|
|
28
|
-
```
|
|
29
|
-
{% endcode %}
|
|
30
|
-
|
|
31
|
-
Instead of passing the Strong preset you could also pass a custom [Config Object](../getting-started/the-config-object.md).
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Command Line Options
|
|
2
|
-
|
|
3
|
-
The following table provides a brief overview over the command line options:
|
|
4
|
-
|
|
5
|
-
| Option | Usage |
|
|
6
|
-
| ----------------------------- | ----------------------------------------------------------- |
|
|
7
|
-
| --preset \[name]; --p \[name] | Specify the config preset to be used; [Details](presets.md) |
|
|
8
|
-
| --config \[path]; --c \[path] | Specify the path to a custom config file |
|
|
9
|
-
| --out \[path]; --o \[path] | Specify the path of the output file |
|
|
10
|
-
| --nocolors | Disable ansi colors escape sequences |
|
|
11
|
-
| --Lua51 | Handle input as Lua 5.1 |
|
|
12
|
-
| --LuaU | Handle input as LuaU |
|
|
13
|
-
| --pretty | Pretty print the output |
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Installation
|
|
2
|
-
|
|
3
|
-
To install Prometheus, simply clone the Github Repository using:
|
|
4
|
-
|
|
5
|
-
```batch
|
|
6
|
-
git clone "https://github.com/levno-710/Prometheus.git"
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Alternatively you can download the Sources [here](https://github.com/levno-710/Prometheus/archive/refs/heads/master.zip).
|
|
10
|
-
|
|
11
|
-
Prometheus also Requires LuaJIT or Lua51 in order to work. The Lua51 binaries can be downloaded [here](https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/).
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Obfuscating your first script
|
|
2
|
-
|
|
3
|
-
Now that you have downloaded and Prometheus, you probably wonder how to use it. In this quick tutorial you are going to learn how to obfuscate your first file.
|
|
4
|
-
|
|
5
|
-
Note that in the following command examples `lua` should be replaced by your lua implementation.
|
|
6
|
-
|
|
7
|
-
Create the following file within the Prometheus main directory that you just downloaded:
|
|
8
|
-
|
|
9
|
-
{% code title="hello_world.lua" %}
|
|
10
|
-
```lua
|
|
11
|
-
print("Hello, World")
|
|
12
|
-
```
|
|
13
|
-
{% endcode %}
|
|
14
|
-
|
|
15
|
-
Now run the following command inside of the Prometheus directory:
|
|
16
|
-
|
|
17
|
-
```batch
|
|
18
|
-
lua ./cli.lua ./hello_world.lua
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
You may notice, that the console output looks weird. If that is the case, your terminal does not support ansi color escape sequences. You should add the `--nocolors` option:
|
|
22
|
-
|
|
23
|
-
```batch
|
|
24
|
-
lua ./cli.lua --nocolors ./hello_world.lua
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This should create the following file:
|
|
28
|
-
|
|
29
|
-
{% code title="hello_world.obfuscated.lua" %}
|
|
30
|
-
```lua
|
|
31
|
-
print("Hello, World")
|
|
32
|
-
```
|
|
33
|
-
{% endcode %}
|
|
34
|
-
|
|
35
|
-
As you can see, the file hasn't changed at all. That is because by default prometheus is just a minifier and the code we gave it was already as small as possible. To actually obfuscate the file, prometheus must be told which obfuscation steps it should apply in which order. In order to do this, the cli provides the `--preset` option which allows you to specify the name of a predefined configuration. There are currently the following presets:
|
|
36
|
-
|
|
37
|
-
* Minify
|
|
38
|
-
* Weak
|
|
39
|
-
* Medium
|
|
40
|
-
* Strong
|
|
41
|
-
|
|
42
|
-
In order to perform the obfuscation, you need to specify that Prometheus should use the Strong preset:
|
|
43
|
-
|
|
44
|
-
```batch
|
|
45
|
-
lua ./cli.lua --preset Medium ./hello_world.lua
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The `hello_world.obfuscated.lua` should now contain the obfuscated code that should still print "Hello World".
|
|
49
|
-
|
|
50
|
-
Note that using the "Strong" preset is not recommended for large projects.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# The Config Object
|
|
2
|
-
|
|
3
|
-
Prometheus takes a configuration objetct. In this object there can be many properties applied. \
|
|
4
|
-
The following table provides an overview:
|
|
5
|
-
|
|
6
|
-
| Property | type | possible values | default |
|
|
7
|
-
| ------------- | ------- | -------------------------------------------- | ----------------- |
|
|
8
|
-
| LuaVersion | string | "Lua51", "LuaU" | "Lua51" |
|
|
9
|
-
| PrettyPrint | boolean | true, false | false |
|
|
10
|
-
| VarNamePrefix | string | any | "" |
|
|
11
|
-
| NameGenerator | string | "Mangled", "MangledShuffled", "Il", "Number" | "MangledShuffled" |
|
|
12
|
-
| Seed | number | any | 0 |
|
|
13
|
-
| Steps | table | StepConfig\[] | {} |
|
|
14
|
-
|
|
15
|
-
As this table shows, all properties in the config object are optional as they have a default value.
|
|
16
|
-
|
|
17
|
-
As an example, here is the code for the minify preset:
|
|
18
|
-
|
|
19
|
-
```lua
|
|
20
|
-
{
|
|
21
|
-
-- The default LuaVersion is Lua51
|
|
22
|
-
LuaVersion = "Lua51";
|
|
23
|
-
-- For minifying no VarNamePrefix is applied
|
|
24
|
-
VarNamePrefix = "";
|
|
25
|
-
-- Name Generator for Variables
|
|
26
|
-
NameGenerator = "MangledShuffled";
|
|
27
|
-
-- No pretty printing
|
|
28
|
-
PrettyPrint = false;
|
|
29
|
-
-- Seed is generated based on current time
|
|
30
|
-
Seed = 0;
|
|
31
|
-
-- No obfuscation steps
|
|
32
|
-
Steps = {
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Steps
|
|
39
|
-
|
|
40
|
-
The most important property is the Steps property. This property must be a table of so called Step Configs. A Step in Prometheus describes a single transformation applied to your script by the Prometheus obfuscation pipeline. A StepConfiguration consists of the Name of the Step as well as settings for the step. All Steps will later be applied in the order they are defined. A single Step can be defined twice and will then be applied twice.
|
|
41
|
-
|
|
42
|
-
```lua
|
|
43
|
-
-- Obfuscation steps
|
|
44
|
-
Steps = {
|
|
45
|
-
{
|
|
46
|
-
-- This obfuscation step puts all constants into an array at the beginning of the code
|
|
47
|
-
Name = "ConstantArray";
|
|
48
|
-
Settings = {
|
|
49
|
-
-- Apply to Strings only
|
|
50
|
-
StringsOnly = true;
|
|
51
|
-
-- Apply to all Constants, 0.5 would only affect 50% of strings
|
|
52
|
-
Treshold = 1;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Under [Steps](broken-reference), you can find all current Steps, their names as well as the possible options.
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Writing a custom Config File
|
|
2
|
-
|
|
3
|
-
Configuration Files for Prometheus are just lua modules, that return a single object, which contains the configuration. Let's say we have the following config file:
|
|
4
|
-
|
|
5
|
-
{% code title="config.lua" %}
|
|
6
|
-
```lua
|
|
7
|
-
return {
|
|
8
|
-
-- The default LuaVersion is Lua51
|
|
9
|
-
LuaVersion = "Lua51"; -- or "LuaU"
|
|
10
|
-
-- All Variables will start with this prefix
|
|
11
|
-
VarNamePrefix = "";
|
|
12
|
-
-- Name Generator for Variables that look like this: b, a, c, D, t, G
|
|
13
|
-
NameGenerator = "MangledShuffled";
|
|
14
|
-
-- No pretty printing
|
|
15
|
-
PrettyPrint = false;
|
|
16
|
-
-- Seed is generated based on current time
|
|
17
|
-
-- When specifying a seed that is not 0, you will get the same output every time
|
|
18
|
-
Seed = 0;
|
|
19
|
-
-- Obfuscation steps
|
|
20
|
-
Steps = {
|
|
21
|
-
{
|
|
22
|
-
-- This obfuscation step puts all constants into an array at the beginning of the code
|
|
23
|
-
Name = "ConstantArray";
|
|
24
|
-
Settings = {
|
|
25
|
-
-- Apply to Strings only
|
|
26
|
-
StringsOnly = true;
|
|
27
|
-
-- Apply to all Constants, 0.5 would only affect 50% of strings
|
|
28
|
-
Treshold = 1;
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
{% endcode %}
|
|
35
|
-
|
|
36
|
-
One can now obfuscate a script using this configuration by running:
|
|
37
|
-
|
|
38
|
-
```batch
|
|
39
|
-
lua ./cli.lua --config config.lua hello_world.lua
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
You should get the following output:
|
|
43
|
-
|
|
44
|
-
{% code title="hello_world.obfuscated.lua" %}
|
|
45
|
-
```lua
|
|
46
|
-
local N={"Hello, World!"}local function k(k)return N[k+40058]end print(k(-40057))
|
|
47
|
-
```
|
|
48
|
-
{% endcode %}
|
|
49
|
-
|
|
50
|
-
As you can see, the only transformation that was applied to our Hello World example was putting all strings (in this case only `"Hello, World!"` ) into an array and creating a wrapper function for retrieving the value.
|
|
51
|
-
|
|
52
|
-
### How does the Config File work?
|
|
53
|
-
|
|
54
|
-
The config file is simply a lua file, that returns the configuration object. Please note that this lua file is sandboxed by Prometheus when loading the configuration, meaning that you can't use any predefined functions like `tostring` or libraries like `math`.
|
|
55
|
-
|
|
56
|
-
See [The Config Object](the-config-object.md) to learn what this configuration object consists of.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: This step provides an obfuscation step, that breaks the script, when someone tries to tamper with it.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Anti Tamper
|
|
6
|
-
|
|
7
|
-
### Settings
|
|
8
|
-
|
|
9
|
-
| Name | type | description | values |
|
|
10
|
-
| ----------- | ---- | ------------------------------------------- | --------------------------------------- |
|
|
11
|
-
| UseDebug | boolean | Uses the debug library in lua. Disable this if you don't have access to debug library | "true","false" |
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: >-
|
|
3
|
-
This Step will Extract all Constants and put them into an Array at the
|
|
4
|
-
beginning of the script
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# ConstantArray
|
|
8
|
-
|
|
9
|
-
### Settings
|
|
10
|
-
|
|
11
|
-
| Name | type | description |
|
|
12
|
-
| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
|
|
13
|
-
| Treshold | number | The relative amount of nodes that will be affected" |
|
|
14
|
-
| StringsOnly | boolean | Wether to only Extract Strings |
|
|
15
|
-
| Shuffle | boolean | Wether to shuffle the order of Elements in the Array |
|
|
16
|
-
| Rotate | boolean | Wether to rotate the String Array by a specific (random) amount. This will be undone on runtime. |
|
|
17
|
-
| LocalWrapperTreshold | number | The relative amount of nodes functions, that will get local wrappers |
|
|
18
|
-
| LocalWrapperCount | number | The number of Local wrapper Functions per scope. This only applies if LocalWrapperTreshold is greater than 0 |
|
|
19
|
-
| LocalWrapperArgCount | number | The number of Arguments to the Local wrapper Functions |
|
|
20
|
-
| MaxWrapperOffset | number | The Max Offset for the Wrapper Functions |
|
|
21
|
-
|
|
22
|
-
### Example
|
|
23
|
-
|
|
24
|
-
{% code title="in.lua" %}
|
|
25
|
-
```lua
|
|
26
|
-
print("1")
|
|
27
|
-
print("2")
|
|
28
|
-
print("3")
|
|
29
|
-
print("4")
|
|
30
|
-
```
|
|
31
|
-
{% endcode %}
|
|
32
|
-
|
|
33
|
-
{% code title="out.lua" %}
|
|
34
|
-
```lua
|
|
35
|
-
-- LocalWrapperCount = 3
|
|
36
|
-
-- LocalWrapperArgCount = 5
|
|
37
|
-
local F = {"4", "3", "2", "1"}
|
|
38
|
-
do
|
|
39
|
-
local y, G = 1, 4
|
|
40
|
-
while y < G do
|
|
41
|
-
F[y], F[G] = F[G], F[y]
|
|
42
|
-
y, G = y + 1, G - 1
|
|
43
|
-
end
|
|
44
|
-
y, G = 1, 3
|
|
45
|
-
while y < G do
|
|
46
|
-
F[y], F[G] = F[G], F[y]
|
|
47
|
-
y, G = y + 1, G - 1
|
|
48
|
-
end
|
|
49
|
-
y, G = 4, 4
|
|
50
|
-
while y < G do
|
|
51
|
-
F[y], F[G] = F[G], F[y]
|
|
52
|
-
y, G = y + 1, G - 1
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
local function y(y)
|
|
56
|
-
return F[y + 440]
|
|
57
|
-
end
|
|
58
|
-
local G = {cb = function(F, G, R, p, b)
|
|
59
|
-
return y(G - 2277)
|
|
60
|
-
end, n = function(F, G, R, p, b)
|
|
61
|
-
return y(p + 47178)
|
|
62
|
-
end, B = function(F, G, R, p, b)
|
|
63
|
-
return y(F + 31775)
|
|
64
|
-
end}
|
|
65
|
-
print(G.cb(1575, 1840, 2367, 1293, 1280))
|
|
66
|
-
print(G.B(-32213, -31781, -31538, -32780, -32728))
|
|
67
|
-
print(G.B(-32214, -33004, -31973, -32125, -31855))
|
|
68
|
-
print(G.B(-32211, -31884, -31217, -32222, -31210))
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
{% endcode %}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: This Step will encrypt all String constants in your code
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# EncryptStrings
|
|
6
|
-
|
|
7
|
-
## Settings
|
|
8
|
-
|
|
9
|
-
None
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
{% code title="in.lua" %}
|
|
14
|
-
```lua
|
|
15
|
-
print("Hello, World!")
|
|
16
|
-
```
|
|
17
|
-
{% endcode %}
|
|
18
|
-
|
|
19
|
-
{% code title="out.lua" %}
|
|
20
|
-
```lua
|
|
21
|
-
-- Settings: None
|
|
22
|
-
local x, F
|
|
23
|
-
do
|
|
24
|
-
local k = math.floor
|
|
25
|
-
local I = math.random
|
|
26
|
-
local Y = table.remove
|
|
27
|
-
local i = string.char
|
|
28
|
-
local K = 0
|
|
29
|
-
local J = 2
|
|
30
|
-
local Q = {}
|
|
31
|
-
local W = {}
|
|
32
|
-
local q = 0
|
|
33
|
-
local R = {}
|
|
34
|
-
for F = 1, 256, 1 do
|
|
35
|
-
R[F] = F
|
|
36
|
-
end
|
|
37
|
-
repeat
|
|
38
|
-
local F = I(1, #R)
|
|
39
|
-
local x = Y(R, F)
|
|
40
|
-
W[x] = i(x - 1)
|
|
41
|
-
until #R == 0
|
|
42
|
-
local j = {}
|
|
43
|
-
local function B()
|
|
44
|
-
if #j == 0 then
|
|
45
|
-
K = (K * 173 + 8408159861491) % 35184372088832
|
|
46
|
-
repeat
|
|
47
|
-
J = (J * 160) % 257
|
|
48
|
-
until J ~= 1
|
|
49
|
-
local F = J % 32
|
|
50
|
-
local x = (k(K / 2 ^ (13 - (J - F) / 32)) % 4294967296) / 2 ^ F
|
|
51
|
-
local I = k((x % 1) * 4294967296) + k(x)
|
|
52
|
-
local Y = I % 65536
|
|
53
|
-
local i = (I - Y) / 65536
|
|
54
|
-
local Q = Y % 256
|
|
55
|
-
local W = (Y - Q) / 256
|
|
56
|
-
local q = i % 256
|
|
57
|
-
local R = (i - q) / 256
|
|
58
|
-
j = {Q, W, q, R}
|
|
59
|
-
end
|
|
60
|
-
return table.remove(j)
|
|
61
|
-
end
|
|
62
|
-
local d = {}
|
|
63
|
-
x = setmetatable({}, {__index = d, __metatable = nil})
|
|
64
|
-
function F(x, k)
|
|
65
|
-
local I = d
|
|
66
|
-
if I[k] then
|
|
67
|
-
else
|
|
68
|
-
j = {}
|
|
69
|
-
local F = W
|
|
70
|
-
K = k % 35184372088832
|
|
71
|
-
J = k % 255 + 2
|
|
72
|
-
local Y = string.len(x)
|
|
73
|
-
I[k] = ""
|
|
74
|
-
local i = 198
|
|
75
|
-
for Y = 1, Y, 1 do
|
|
76
|
-
i = ((string.byte(x, Y) + B()) + i) % 256
|
|
77
|
-
I[k] = I[k] .. F[i + 1]
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
return k
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
print(x[F("\219\018Q%~Y\225\128u\128\208&\155", 6909832146399)])
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
{% endcode %}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: This Step wraps all locals into Proxy Objects
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ProxifyLocals
|
|
6
|
-
|
|
7
|
-
### Settings
|
|
8
|
-
|
|
9
|
-
| Name | type | description | values |
|
|
10
|
-
| ----------- | ---- | ------------------------------------------- | --------------------------------------- |
|
|
11
|
-
| LiteralType | enum | The type of the randomly generated literals | "dictionary", "number", "string", "any" |
|
|
12
|
-
|
|
13
|
-
### Example
|
|
14
|
-
|
|
15
|
-
{% code title="in.lua" %}
|
|
16
|
-
```lua
|
|
17
|
-
local x = "Hello, World!"
|
|
18
|
-
print(x)
|
|
19
|
-
```
|
|
20
|
-
{% endcode %}
|
|
21
|
-
|
|
22
|
-
{% code title="out.lua" %}
|
|
23
|
-
```lua
|
|
24
|
-
-- LiteralType = "dictionary"
|
|
25
|
-
local n = setmetatable
|
|
26
|
-
local D =
|
|
27
|
-
n(
|
|
28
|
-
{Wz = function()
|
|
29
|
-
end},
|
|
30
|
-
{__div = function(R, n)
|
|
31
|
-
R.Wz = n
|
|
32
|
-
end, __concat = function(R, n)
|
|
33
|
-
return R.Wz
|
|
34
|
-
end}
|
|
35
|
-
)
|
|
36
|
-
local R =
|
|
37
|
-
n(
|
|
38
|
-
{Js = "Hello, World!"},
|
|
39
|
-
{__add = function(R, n)
|
|
40
|
-
R.Js = n
|
|
41
|
-
end, __index = function(R, n)
|
|
42
|
-
return rawget(R, "Js")
|
|
43
|
-
end}
|
|
44
|
-
)
|
|
45
|
-
print(R.Muirgen)
|
|
46
|
-
```
|
|
47
|
-
{% endcode %}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: This Step splits Strings to a specific or random length
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# SplitStrings
|
|
6
|
-
|
|
7
|
-
### Settings
|
|
8
|
-
|
|
9
|
-
| Name | type | description | Values |
|
|
10
|
-
| ------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
|
|
11
|
-
| Treshold | number | The relative amount of nodes that will be affected | 0 <= x <= 1 |
|
|
12
|
-
| MinLength | number | The minimal length for the chunks in that the Strings are splitted | x > 0 |
|
|
13
|
-
| MaxLength | number | The maximal length for the chunks in that the Strings are splitted | x >= MinLength |
|
|
14
|
-
| ConcatenationType | enum | The Functions used for Concatenation. Note that when using custom, the String Array will also be Shuffled | "strcat", "table", "custom" |
|
|
15
|
-
| CustomFunctionType | enum | <p>The Type of Function code injection This Option only applies when custom Concatenation is selected.<br>Note that when chosing inline, the code size may increase significantly!</p> | "global", "local", "inline" |
|
|
16
|
-
| CustomLocalFunctionsCount | number | The number of local functions per scope. This option only applies when CustomFunctionType = local | x > 0 |
|
|
17
|
-
|
|
18
|
-
### Example
|
|
19
|
-
|
|
20
|
-
{% code title="in.lua" %}
|
|
21
|
-
```lua
|
|
22
|
-
print("Hello, World!")
|
|
23
|
-
```
|
|
24
|
-
{% endcode %}
|
|
25
|
-
|
|
26
|
-
{% code title="out.lua" %}
|
|
27
|
-
```lua
|
|
28
|
-
-- MinLength = 1
|
|
29
|
-
-- MaxLength = 1
|
|
30
|
-
local f = function(f)
|
|
31
|
-
local k, C = f[#f], ""
|
|
32
|
-
for j = 1, #k, 1 do
|
|
33
|
-
C = C .. k[f[j]]
|
|
34
|
-
end
|
|
35
|
-
return C
|
|
36
|
-
end
|
|
37
|
-
print(f({13, 11, 4, 12, 1, 6, 8, 10, 9, 7, 3, 2, 5, {"o", "d", "l", "l", "!", ",", "r", " ", "o", "W", "e", "l", "H"}}))
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
{% endcode %}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: This Step Wraps the Entire Script into a Function
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# WrapInFunction
|
|
6
|
-
|
|
7
|
-
### Settings
|
|
8
|
-
|
|
9
|
-
| Name | type | description |
|
|
10
|
-
| ---------- | ------ | ------------------------ |
|
|
11
|
-
| Iterations | number | The Number Of Iterations |
|
|
12
|
-
|
|
13
|
-
### Example
|
|
14
|
-
|
|
15
|
-
{% code title="in.lua" %}
|
|
16
|
-
```lua
|
|
17
|
-
print("Hello, World!")
|
|
18
|
-
```
|
|
19
|
-
{% endcode %}
|
|
20
|
-
|
|
21
|
-
{% code title="out.lua" %}
|
|
22
|
-
```lua
|
|
23
|
-
-- Iterations = 1
|
|
24
|
-
return (function()
|
|
25
|
-
print("Hello, World!")
|
|
26
|
-
end)()
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
{% endcode %}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require("cli")
|