Skip to content

Commit 965b661

Browse files
levno-710gitbook-bot
authored andcommitted
GitBook: [#28] No subject
1 parent b1571a4 commit 965b661

File tree

7 files changed

+38
-17
lines changed

7 files changed

+38
-17
lines changed

doc/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ description: Prometheus is an Lua Obfuscator, that is written in pure Lua.
77
Prometheus can obfuscate Lua51 as well as Roblox's LuaU, which is an optionally typed superset of Lua51.
88

99
Show Prometheus on [github](https://github.com/levno-710/Prometheus).
10+
11+
This Documentation only applies to the newest version of Prometheus.

doc/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* [Installation](getting-started/installation.md)
88
* [Obfuscating your first script](getting-started/obfuscating-your-first-script.md)
99
* [Command Line Options](getting-started/command-line-options.md)
10+
* [Presets](getting-started/presets.md)
1011
* [Writing a custom Config File](getting-started/writing-a-custom-config-file.md)
1112
* [The Config Object](getting-started/the-config-object.md)
1213

doc/getting-started/command-line-options.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
The following table provides a brief overview over the command line options:
44

5-
| Option | Usage | |
6-
| ----------------------------- | ---------------------------------------- | - |
7-
| --preset \[name]; --p \[path] | Specify the config preset to be used | |
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 | |
5+
| Option | Usage | |
6+
| ----------------------------- | ----------------------------------------------------------- | - |
7+
| --preset \[name]; --p \[path] | 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 | |

doc/getting-started/obfuscating-your-first-script.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ print("Hello, World")
3434
```
3535
{% endcode %}
3636

37-
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 only two presets:
37+
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:
3838

3939
* Minify
40+
* Vm
41+
* Weak
42+
* Medium
4043
* Strong
4144

4245
In order to perform the obfuscation, you need to specify that Prometheus should use the Strong preset:
@@ -46,3 +49,5 @@ lua ./cli.lua --preset Strong ./hello_world.lua
4649
```
4750

4851
The `hello_world.obfuscated.lua` should now become around 20kB in size, but when running, it should still print "Hello World".
52+
53+
Note that using the "Strong" preset is not recommended for large projects as bigger files will get around 15x in size.

doc/getting-started/presets.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Presets
2+
3+
The following table provides an overview over the presets
4+
5+
| name | usage | size | speed |
6+
| ------ | -------------------------------------------------------------------------------------------------------- | ------ | ------- |
7+
| Minify | Simply minifies your source file | tiny | fastest |
8+
| Vm | Compiles your source file using a custom compiler and implements a vm for running the generated bytecode | big | slow |
9+
| Weak | Extracts all Strings from your Program and puts them into a table at the beginning of the Program | small | fast |
10+
| Medium | Applies more advanced obfuscation techniques. | medium | medium |
11+
| Strong | Applies almost all obfuscation techniques that prometheus provides. | huge | slowest |

doc/steps/proxifylocals.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ description: This Step wraps all locals into Proxy Objects
66

77
### Settings
88

9-
None
9+
| Name | type | description | values |
10+
| ----------- | ---- | ------------------------------------------- | --------------------------------------- |
11+
| LiteralType | enum | The type of the randomly generated literals | "dictionary", "number", "string", "any" |
1012

1113
### Example
1214

@@ -19,7 +21,7 @@ print(x)
1921

2022
{% code title="out.lua" %}
2123
```lua
22-
-- No Settings
24+
-- LiteralType = "dictionary"
2325
local n = setmetatable
2426
local D =
2527
n(

doc/steps/splitstrings.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ description: This Step splits Strings to a specific or random length
66

77
### Settings
88

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 coustom, the String Array will also be Shuffled | "strcat", "table", "coustom" |
15-
| CoustomFunctionType | enum | <p>The Type of Function code injection This Option only applies when coustom Concatenation is selected.<br>Note that when chosing inline, the code size may increase significantly!</p> | "global", "local", "inline" |
16-
| CoustomLocalFunctionsCount | number | The number of local functions per scope. This option only applies when CoustomFunctionType = local | x > 0 |
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 coustom, 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 coustom 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 CoustomFunctionType = local | x > 0 |
1717

1818
### Example
1919

0 commit comments

Comments
 (0)