Skip to content

Commit f67ec5f

Browse files
authored
Merge pull request #102 from oxince/master
Add Watermark Feature
2 parents e639587 + a53d10c commit f67ec5f

File tree

4 files changed

+52
-8
lines changed

4 files changed

+52
-8
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ lua ./cli.lua [options]
5555
- [pnlmon](https://github.com/pnlmon)
5656
- [britzl](https://github.com/britzl)
5757
- [SpinnySpiwal](https://github.com/SpinnySpiwal)
58+
- [oxince](https://github.com/oxince)
5859
## License
5960
This Project is Licensed under the GNU General Public License v3.0. For more details, please refer to [LICENSE](https://github.com/levno-710/Prometheus/blob/master/LICENSE).

src/presets.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ return {
108108

109109
}
110110
},
111+
{
112+
Name = "Watermark";
113+
Settings = {
114+
Content = "This Script was obfuscated using the Medium Preset of Prometheus Obfuscator by Levno_710"
115+
}
116+
}
111117
}
112118
};
113119
["Strong"] = {

src/prometheus/steps.lua

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
return {
2-
WrapInFunction = require("prometheus.steps.WrapInFunction");
3-
SplitStrings = require("prometheus.steps.SplitStrings");
4-
Vmify = require("prometheus.steps.Vmify");
5-
ConstantArray = require("prometheus.steps.ConstantArray");
6-
ProxifyLocals = require("prometheus.steps.ProxifyLocals");
7-
AntiTamper = require("prometheus.steps.AntiTamper");
8-
EncryptStrings = require("prometheus.steps.EncryptStrings");
2+
WrapInFunction = require("prometheus.steps.WrapInFunction");
3+
SplitStrings = require("prometheus.steps.SplitStrings");
4+
Vmify = require("prometheus.steps.Vmify");
5+
ConstantArray = require("prometheus.steps.ConstantArray");
6+
ProxifyLocals = require("prometheus.steps.ProxifyLocals");
7+
AntiTamper = require("prometheus.steps.AntiTamper");
8+
EncryptStrings = require("prometheus.steps.EncryptStrings");
99
NumbersToExpressions = require("prometheus.steps.NumbersToExpressions");
10-
AddVararg = require("prometheus.steps.AddVararg");
10+
AddVararg = require("prometheus.steps.AddVararg");
11+
Watermark = require("prometheus.steps.Watermark");
1112
}

src/prometheus/steps/Watermark.lua

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
-- This Script is Part of the Prometheus Obfuscator by Levno_710
2+
--
3+
-- Watermark.lua
4+
--
5+
-- This Script provides a Step that will add a watermark to the script
6+
7+
local Step = require("prometheus.step");
8+
local Ast = require("prometheus.ast");
9+
local Scope = require("prometheus.scope");
10+
11+
local Watermark = Step:extend();
12+
Watermark.Description = "This Step will add a watermark to the script";
13+
Watermark.Name = "Watermark";
14+
15+
Watermark.SettingsDescriptor = {
16+
Content = {
17+
name = "Content",
18+
description = "The Content of the Watermark",
19+
type = "string",
20+
default = "This Script is Part of the Prometheus Obfuscator by Levno_710",
21+
},
22+
}
23+
24+
function Watermark:init(settings)
25+
26+
end
27+
28+
function Watermark:apply(ast)
29+
local body = ast.body;
30+
if string.len(self.Content) > 0 then
31+
local watermark = body.scope:addVariable();
32+
table.insert(body.statements, 1, Ast.LocalVariableDeclaration(body.scope, {watermark}, {Ast.StringExpression(self.Content)}));
33+
end
34+
end
35+
36+
return Watermark;

0 commit comments

Comments
 (0)