Skip to content

Commit 9895aff

Browse files
committed
Add Watermark Step
1 parent e639587 commit 9895aff

File tree

3 files changed

+53
-10
lines changed

3 files changed

+53
-10
lines changed

src/presets.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,17 @@ return {
103103
}
104104
},
105105
{
106-
Name = "WrapInFunction";
106+
Name = "WrapInFunction",
107107
Settings = {
108-
108+
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 Simple Obfuscation 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)