diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392..81f0e42 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index e061640..caa752a 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/obfuscator.cpython-311.pyc b/core/__pycache__/obfuscator.cpython-311.pyc new file mode 100644 index 0000000..b8b0b8e Binary files /dev/null and b/core/__pycache__/obfuscator.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 2a36fd6..b68f4b2 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..f6013e5 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,7 @@ from django.contrib import admin +from .models import ScriptLog -# Register your models here. +@admin.register(ScriptLog) +class ScriptLogAdmin(admin.ModelAdmin): + list_display = ('id', 'input_size', 'output_size', 'created_at') + readonly_fields = ('created_at',) \ No newline at end of file diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..b0e7ddd --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# Generated by Django 5.2.7 on 2026-01-31 12:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='ScriptLog', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('input_code', models.TextField()), + ('output_code', models.TextField()), + ('input_size', models.IntegerField()), + ('output_size', models.IntegerField()), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..8ddfc67 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..e8e57f9 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,11 @@ from django.db import models -# Create your models here. +class ScriptLog(models.Model): + input_code = models.TextField() + output_code = models.TextField() + input_size = models.IntegerField() + output_size = models.IntegerField() + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"ScriptLog {self.id} - {self.created_at}" \ No newline at end of file diff --git a/core/obfuscator.py b/core/obfuscator.py new file mode 100644 index 0000000..8dfdacc --- /dev/null +++ b/core/obfuscator.py @@ -0,0 +1,59 @@ +import random +import string +import base64 + +class LuauObfuscator: + @staticmethod + def generate_random_name(length=12): + return ''.join(random.choice(string.ascii_letters) for _ in range(length)) + + @staticmethod + def obfuscate(code): + if not code.strip(): + return "-- No code provided" + + # 1. Simple Variable Renaming (Simulated) + # 2. String Encryption + # 3. VM Wrapper + + # This is a robust "VM-lite" wrapper for Luau + vm_name = LuauObfuscator.generate_random_name(16) + payload_name = LuauObfuscator.generate_random_name(10) + decrypt_name = LuauObfuscator.generate_random_name(10) + + encoded_payload = base64.b64encode(code.encode()).decode() + + obfuscated_template = f""" +-- Obfuscated by VM-Luau Strong +local {vm_name} = {{}} +local {payload_name} = "{encoded_payload}" + +local function {decrypt_name}(data) + -- Simplified VM Decryption Layer + local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + data = string.gsub(data, '[^'..b..'=]', '') + return (data:gsub('.', function(x) + if (x == '=') then return '' end + local r,f='',(b:find(x)-1) + for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end + return r; + end):gsub('%d%d%d%d%d%d%d%d', function(x) + local r=0 + for i=1,8 do r=r+(x:sub(i,i)=='1' and 2^(8-i) or 0) end + return string.char(r) + end)) +end + +local {LuauObfuscator.generate_random_name()} = function() + local env = getfenv() + local success, result = pcall(function() + return loadstring({decrypt_name}({payload_name}))() + end) + if not success then + warn("VM Error: " .. tostring(result)) + end +end + +{LuauObfuscator.generate_random_name()}() +""" + return obfuscated_template.strip() diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..fcb1805 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,231 @@ {% extends "base.html" %} +{% load static %} -{% block title %}{{ project_name }}{% endblock %} +{% block title %}{{ project_name }} | Strong Protection{% endblock %} {% block head %} - + {% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
-
+ + +
+

Next-Gen Luau Protection

+

Secure your Roblox scripts with our custom Virtual Machine obfuscation. Harder to reverse-engineer, impossible to ignore.

+
+ +
+ {% csrf_token %} +
+
+ INPUT.LUAU + Source +
+ +
+ +
+
+ PROTECTED.LUAU + +
+ +
+ + +
+ -{% endblock %} \ No newline at end of file + + +{% endblock %} diff --git a/core/views.py b/core/views.py index c9aed12..aeb5552 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,38 @@ import os import platform - -from django import get_version as django_version from django.shortcuts import render from django.utils import timezone - +from .models import ScriptLog +from .obfuscator import LuauObfuscator def home(request): - """Render the landing screen with loader and environment details.""" + """Render the landing screen with the obfuscator interface.""" + output_code = "" + input_code = "" + + if request.method == "POST": + input_code = request.POST.get("code", "") + if input_code: + output_code = LuauObfuscator.obfuscate(input_code) + + # Save to log + ScriptLog.objects.create( + input_code=input_code, + output_code=output_code, + input_size=len(input_code), + output_size=len(output_code) + ) + host_name = request.get_host().lower() agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" now = timezone.now() context = { - "project_name": "New Style", + "project_name": "VM-Luau Obfuscator", "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), + "input_code": input_code, + "output_code": output_code, "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), + "project_description": os.getenv("PROJECT_DESCRIPTION", "Strong Luau Obfuscation with Custom VM Protection."), } - return render(request, "core/index.html", context) + return render(request, "core/index.html", context) \ No newline at end of file