Skip to content

Commit 7342a18

Browse files
authored
Alpha v0.1.6
2 parents 6e0a584 + 03517c8 commit 7342a18

38 files changed

+129
-104
lines changed

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", "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 |
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 custom, 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 custom 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 CustomFunctionType = local | x > 0 |
1717

1818
### Example
1919

doc/steps/vmify.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: >-
3-
This Step will Compile your script into a fully-coustom (not a half coustom
4-
like other lua obfuscators) Bytecode Format and emit a vm for executing it.
3+
This Step will Compile your script into a fully-custom (not a half custom like
4+
other lua obfuscators) Bytecode Format and emit a vm for executing it.
55
---
66

77
# Vmify

src/cli.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ package.path = script_path() .. "?.lua;" .. package.path;
1313
local Prometheus = require("prometheus");
1414
Prometheus.Logger.logLevel = Prometheus.Logger.LogLevel.Info;
1515

16+
-- Override Error callback
17+
Prometheus.Logger.errorCallback = function(...)
18+
print(Prometheus.colors(Prometheus.Config.NameUpper .. ": " .. ..., "red"))
19+
os.exit(1);
20+
end
21+
1622
-- see if the file exists
1723
local function file_exists(file)
1824
local f = io.open(file, "rb")

src/highlightlua.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
--
33
-- This Script provides a simple Method for Syntax Highlighting of Lua code
44

5-
local Tokenizer = require("obfuscator.tokenizer");
5+
local Tokenizer = require("prometheus.tokenizer");
66
local colors = require("colors");
77
local TokenKind = Tokenizer.TokenKind;
8-
local lookupify = require("obfuscator.util").lookupify;
8+
local lookupify = require("prometheus.util").lookupify;
99

1010
return function(code, luaVersion)
1111
local out = "";

src/obfuscator/namegenerators.lua

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/obfuscator/steps.lua

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/prometheus.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ local oldPkgPath = package.path;
1313
package.path = script_path() .. "?.lua;" .. package.path;
1414

1515
-- Require Prometheus Submodules
16-
local Pipeline = require("obfuscator.pipeline");
16+
local Pipeline = require("prometheus.pipeline");
1717
local highlight = require("highlightlua");
1818
local colors = require("colors");
1919
local Logger = require("logger");
20-
local Presets = require("presets")
20+
local Presets = require("presets");
21+
local Config = require("config");
22+
local util = require("prometheus.util");
2123

2224
-- Restore package.path
2325
package.path = oldPkgPath;
@@ -26,6 +28,7 @@ package.path = oldPkgPath;
2628
return {
2729
Pipeline = Pipeline;
2830
colors = colors;
31+
Config = util.readonly(Config); -- Readonly
2932
Logger = Logger;
3033
highlight = highlight;
3134
Presets = Presets;
File renamed without changes.
File renamed without changes.

src/obfuscator/compiler_secure/bytecode.lua renamed to src/prometheus/compiler_secure/bytecode.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
-- This Script contains the Bytecode library for Compiling to Prometheus Bytecode
55

66
-- For Lua5.1 Compatibility
7-
local bit32 = require("bit") or require("obfuscator.bit").bit32;
7+
local bit32 = require("bit") or require("prometheus.bit").bit32;
88
local logger = require("logger");
9-
local util = require("obfuscator.util");
10-
local vmstrings = require("obfuscator.compiler_secure.vmstrings");
11-
local Parser = require("obfuscator.parser");
12-
local enums = require("obfuscator.enums");
9+
local util = require("prometheus.util");
10+
local vmstrings = require("prometheus.compiler_secure.vmstrings");
11+
local Parser = require("prometheus.parser");
12+
local enums = require("prometheus.enums");
1313

1414
local LuaVersion = enums.LuaVersion;
1515
local BIT_MAX_8 = 255;
1616
local BIT_MAX_16 = 65535;
1717

18-
local InstructionKind = require("obfuscator.compiler_secure.instructionkind");
18+
local InstructionKind = require("prometheus.compiler_secure.instructionkind");
1919

2020
local Bytecode = {
2121
InstructionKind = InstructionKind

0 commit comments

Comments
 (0)