You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
This should create the following file:
22
+
23
+
{% code title="hello_world.obfuscated.lua" %}
24
+
```lua
25
+
print("Hello, World")
26
+
```
27
+
{% endcode %}
28
+
29
+
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 has the `--preset` option which allows you to specify the name of a predefined configuration. There are currently only two presets:
30
+
31
+
* Minify
32
+
* Strong
33
+
34
+
In order to perform the obfuscation, you need to specify that Prometheus should use the Strong preset:
35
+
36
+
```batch
37
+
lua ./cli.lua --preset Strong ./hello_world.lua
38
+
```
39
+
40
+
The `hello_world.obfuscated.lua` should now become around 20kB in size, but when running, it should still print "Hello World".
0 commit comments