File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 88 BreakBeautify = require (" prometheus.steps.BreakBeautify" );
99 EncryptStrings = require (" prometheus.steps.EncryptStrings" );
1010 NumbersToExpressions = require (" prometheus.steps.NumbersToExpressions" );
11+ AddVararg = require (" prometheus.steps.AddVararg" );
1112}
Original file line number Diff line number Diff line change 1+ -- This Script is Part of the Prometheus Obfuscator by Levno_710
2+ --
3+ -- AddVararg.lua
4+ --
5+ -- This Script provides a Simple Obfuscation Step that wraps the entire Script into a function
6+
7+ local Step = require (" prometheus.step" );
8+ local Ast = require (" prometheus.ast" );
9+ local visitast = require (" prometheus.visitast" );
10+ local AstKind = Ast .AstKind ;
11+
12+ local AddVararg = Step :extend ();
13+ AddVararg .Description = " This Step Adds Vararg to all Functions" ;
14+ AddVararg .Name = " Add Vararg" ;
15+
16+ AddVararg .SettingsDescriptor = {
17+ }
18+
19+ function AddVararg :init (settings )
20+
21+ end
22+
23+ function AddVararg :apply (ast )
24+ visitast (ast , nil , function (node )
25+ if node .kind == AstKind .FunctionDeclaration or node .kind == AstKind .LocalFunctionDeclaration or node .kind == AstKind .FunctionLiteralExpression then
26+ if # node .args < 1 or node .args [# node .args ].kind ~= AstKind .VarargExpression then
27+ node .args [# node .args + 1 ] = Ast .VarargExpression ();
28+ end
29+ end
30+ end )
31+ end
32+
33+ return AddVararg ;
You can’t perform that action at this time.
0 commit comments