Skip to content

Commit 4113046

Browse files
authored
Update script.js
1 parent d810d2c commit 4113046

1 file changed

Lines changed: 32 additions & 34 deletions

File tree

script.js

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,58 @@
11
const i = document.getElementById('in');
22
const o = document.getElementById('out');
3-
const luaImg = document.getElementById('luaImg');
3+
const ghSpinner = document.getElementById('gh-spinner');
44
const log = document.getElementById('status-log');
55
const lbar = document.getElementById('lbar');
66
const loader = document.getElementById('output-loader');
77
const goBtn = document.getElementById('go');
8+
const dlBtn = document.getElementById('dl');
9+
const clearBtn = document.getElementById('clear');
810

911
const gen = (t, l) => {
10-
let c = t === 'upper' ? "ABCDEFGHIJKLMNOPQRSTUVWXYZ" : t === 'mixed' ? "AbCdEfGhIjKlMnOpQrStUvWxYz" : "lIlIIllllIIl";
12+
let c = t === 'upper' ? "ABCDEFGHIJKLMNOPQRSTUVWXYZ" : "lIlIIllllIIl";
1113
return Array.from({length: l}, () => c[Math.floor(Math.random() * c.length)]).join('');
1214
};
1315

14-
const junkMath = (n) => {
15-
const r = Math.floor(Math.random() * 5000);
16-
return `(${r + n} - ${r})`;
17-
};
18-
1916
const phases = [
20-
"pobfus v1.12.01-1 connecting...",
17+
"analyzing source environment...",
2118
"fetching premium tamper assets...",
22-
"generating polymorphic bytecode...",
23-
"obfuscating control flow...",
24-
"applying xor-masking...",
25-
"sealing virtual machine..."
19+
"virtualizing constant stack...",
20+
"sealing polymorphic bytecode...",
21+
"v1.12.01-1 protection complete."
2622
];
2723

2824
const updateLog = async (text) => {
2925
const entries = log.querySelectorAll('.status-entry');
3026
entries.forEach(e => e.classList.add('dim'));
3127
if (entries.length > 2) entries[0].remove();
32-
3328
const div = document.createElement('div');
3429
div.className = 'status-entry';
3530
div.innerText = text;
3631
log.appendChild(div);
3732
};
3833

34+
clearBtn.onclick = () => {
35+
i.value = ''; o.value = ''; dlBtn.disabled = true;
36+
};
37+
38+
dlBtn.onclick = () => {
39+
const blob = new Blob([o.value], {type: 'text/plain'});
40+
const a = document.createElement('a');
41+
a.href = URL.createObjectURL(blob);
42+
a.download = "protected_v1_12_01_1.lua";
43+
a.click();
44+
};
45+
3946
goBtn.onclick = async () => {
4047
const source = i.value.trim();
4148
if (!source) return;
4249

4350
loader.style.display = 'flex';
4451
log.innerHTML = '';
4552
lbar.style.width = '0%';
46-
luaImg.classList.remove('fade');
53+
ghSpinner.classList.add('spinning');
4754

4855
for (let idx = 0; idx < phases.length; idx++) {
49-
if (idx === 2) luaImg.classList.add('fade');
5056
await updateLog(phases[idx]);
5157
lbar.style.width = `${((idx + 1) / phases.length) * 100}%`;
5258
await new Promise(r => setTimeout(r, 600 + Math.random() * 400));
@@ -55,32 +61,24 @@ goBtn.onclick = async () => {
5561
// Protection Logic
5662
const key = Math.floor(Math.random() * 200) + 50;
5763
const bytes = source.split('').map(c => c.charCodeAt(0) ^ key);
58-
59-
// Robux Icon:  | Premium Icon: 
6064
const ROBUX = "\\238\\128\\139";
6165
const PREM = "\\238\\128\\129";
6266

63-
const V_VM = gen('upper', 25);
64-
const V_KEY = gen('upper', 12);
65-
const V_DATA = gen('', 35);
66-
const V_CRASH = gen('mixed', 18);
67-
const V_ITER = gen('mixed', 8);
67+
const V_VM = gen('upper', 24);
68+
const V_DATA = gen('', 32);
69+
const V_CRASH = gen('upper', 16);
6870

6971
let payload = `--[[ protected by pobfus v1.12.01-1 ]]\n`;
70-
71-
// Standalone Tamper Function
72-
payload += `local function ${V_CRASH}() while true do warn("${ROBUX} UNAUTHORIZED TAMPER ${PREM}") end end `;
72+
payload += `local function ${V_CRASH}() while true do warn("${ROBUX} TAMPER ${PREM}") end end `;
7373
payload += `if (debug and debug.getinfo) or (_G.shared) then ${V_CRASH}() end `;
74-
75-
// Virtual Machine
76-
payload += `local ${V_KEY} = ${junkMath(key)} `;
77-
payload += `local ${V_DATA} = {${bytes.join(',')}} `;
78-
payload += `local function ${V_VM}() `;
79-
payload += `if tostring(${V_VM}):find("func") == nil then ${V_CRASH}() end `;
80-
payload += `local s = "" for ${V_ITER}=1, #${V_DATA} do s = s .. string.char(bit32.bxor(${V_DATA}[${V_ITER}], ${V_KEY})) end `;
74+
payload += `local d = {${bytes.join(',')}} local k = ${key} `;
75+
payload += `local function ${V_VM}() local s = "" `;
76+
payload += `for i=1, #d do s = s .. string.char(bit32.bxor(d[i], k)) end `;
8177
payload += `local f = loadstring(s) if f then setfenv(f, getfenv()) f() end end `;
82-
payload += `${V_VM}() --[[ end of obfuscation ]]`;
78+
payload += `${V_VM}()`;
8379

8480
o.value = payload;
85-
setTimeout(() => { loader.style.display = 'none'; }, 600);
81+
dlBtn.disabled = false;
82+
ghSpinner.classList.remove('spinning');
83+
setTimeout(() => { loader.style.display = 'none'; }, 500);
8684
};

0 commit comments

Comments
 (0)