|
1 | | -/* POBFUS 0.7 - FULL CORE |
2 | | - Place this in your script.js |
3 | | -*/ |
4 | | - |
5 | | -const POBFUS_LOGO = String.raw` |
6 | | - /$$$$$$$ /$$ /$$$$$$ |
7 | | -| $$__ $$ | $$ /$$__ $$ |
8 | | -| $$ \ $$ /$$$$$$ | $$$$$$$ | $$ \__//$$ /$$ /$$$$$$$ |
9 | | -| $$$$$$$//$$__ $$| $$__ $$| $$$$ | $$ | $$ /$$_____/ |
10 | | -| $$____/| $$ \ $$| $$ \ $$| $$_/ | $$ | $$| $$$$$$ |
11 | | -| $$ | $$ | $$| $$ | $$| $$ | $$ | $$ \____ $$ |
12 | | -| $$ | $$$$$$/| $$$$$$$/| $$ | $$$$$$/ /$$$$$$$/ |
13 | | -|__/ \______/ |_______/ |__/ \______/ |_______/ |
14 | | -`; |
| 1 | +// --- script.js --- |
15 | 2 |
|
16 | | -function generateJunk() { |
17 | | - const segments = [ |
18 | | - "if _G.PobfusManaged == nil then _G.PobfusManaged = true end", |
19 | | - "local _0xTemp = debug and debug.info or getfenv", |
20 | | - "if (5 + 2 == 10) then while true do end end", |
21 | | - "local _env = getfenv and getfenv() or _G", |
22 | | - "for i=1, math.random(2, 5) do local x = i * 2 end" |
23 | | - ]; |
24 | | - return segments[Math.floor(Math.random() * segments.length)]; |
25 | | -} |
| 3 | +// 1. Better Randomization Engine |
| 4 | +const randomHex = (l) => "_0x" + Math.floor(Math.random() * 0xFFFFFF).toString(16).padEnd(l, '0'); |
26 | 5 |
|
27 | 6 | function pobfusStart() { |
28 | 7 | const input = document.getElementById('inputCode').value; |
29 | | - if (!input) return alert("Please input your Lua script!"); |
| 8 | + if (!input) return alert("Input required!"); |
| 9 | + |
| 10 | + // 2. Control Flow Flattening (State Machine) |
| 11 | + // We create random 'states' so the code doesn't run top-to-bottom. |
| 12 | + const states = [10, 25, 42, 67, 88].sort(() => Math.random() - 0.5); |
| 13 | + const v_state = randomHex(4); |
| 14 | + const v_vm = randomHex(6); |
| 15 | + |
| 16 | + // 3. Dynamic Keying (Logo-Linked) |
| 17 | + const logoSig = ASCII_LOGO.length % 255; |
| 18 | + const baseKey = Math.floor(Math.random() * 150) + 50; |
| 19 | + const finalKey = baseKey ^ logoSig; |
| 20 | + const bytes = input.split('').map(c => c.charCodeAt(0) ^ finalKey); |
| 21 | + |
| 22 | + // 4. The Flattened VM Template |
| 23 | + const vm = `--[[ |
| 24 | +${ASCII_LOGO} |
| 25 | + [ VERSION: 0.7 FLATTENED ] |
| 26 | +--]] |
| 27 | +local ${v_vm} = function() |
| 28 | + local _data = {${bytes.join(',')}} |
| 29 | + local _k = ${baseKey} ~ (#debug.getinfo(1).source % 255) |
| 30 | + local _res = "" |
| 31 | + local ${v_state} = ${states[0]} |
30 | 32 |
|
31 | | - // 1. Convert Lua String to Encrypted Bytecode Table |
32 | | - const key = Math.floor(Math.random() * 255) + 1; |
33 | | - const bytes = input.split('').map(char => char.charCodeAt(0) ^ key); |
| 33 | + -- Control Flow Flattening Dispatcher |
| 34 | + while ${v_state} ~= 0 do |
| 35 | + if ${v_state} == ${states[0]} then |
| 36 | + for i=1, #_data do _res = _res .. string.char(_data[i] ~ _k) end |
| 37 | + ${v_state} = ${states[1]} |
| 38 | + elseif ${v_state} == ${states[1]} then |
| 39 | + local _f = loadstring or load |
| 40 | + local _s, _err = pcall(_f(_res)) |
| 41 | + if not _s then error("!! TAMPER !!") end |
| 42 | + ${v_state} = 0 -- Exit State |
| 43 | + else |
| 44 | + -- Junk State (Confusion for De-obfuscators) |
| 45 | + local _junk = math.pi * math.random() |
| 46 | + ${v_state} = 0 |
| 47 | + end |
| 48 | + end |
| 49 | +end |
| 50 | +
|
| 51 | +pcall(${v_vm}) |
| 52 | +`; |
34 | 53 |
|
35 | | - // 2. Build the VM (The Interpreter) |
36 | | - // We use getfenv to hide the execution environment |
37 | | - const output = `--[[ |
| 54 | + document.getElementById('outputCode').value = vm; |
| 55 | + } const output = `--[[ |
38 | 56 | ${POBFUS_LOGO} |
39 | 57 | [ VERSION: 0.7 BETA ] |
40 | 58 | [ PROTECTION: VM + X-TABLE ] |
|
0 commit comments