Auto commit: 2026-01-31T12:38:38.847Z

This commit is contained in:
Flatlogic Bot 2026-01-31 12:38:38 +00:00
parent 8e9ddb99c7
commit 1e4ab4a6a6
11 changed files with 331 additions and 136 deletions

Binary file not shown.

View File

@ -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',)

View File

@ -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)),
],
),
]

View File

@ -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}"

59
core/obfuscator.py Normal file
View File

@ -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()

View File

@ -1,145 +1,231 @@
{% extends "base.html" %}
{% load static %}
{% block title %}{{ project_name }}{% endblock %}
{% block title %}{{ project_name }} | Strong Protection{% endblock %}
{% block head %}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--bg-color-start: #6a11cb;
--bg-color-end: #2575fc;
--text-color: #ffffff;
--card-bg-color: rgba(255, 255, 255, 0.01);
--card-border-color: rgba(255, 255, 255, 0.1);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: 'Inter', sans-serif;
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
color: var(--text-color);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
text-align: center;
overflow: hidden;
position: relative;
}
body::before {
content: '';
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
animation: bg-pan 20s linear infinite;
z-index: -1;
}
@keyframes bg-pan {
0% {
background-position: 0% 0%;
:root {
--primary-bg: #0f172a;
--secondary-bg: #1e293b;
--accent-blue: #38bdf8;
--accent-green: #22c55e;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--border-color: #334155;
--glass-bg: rgba(30, 41, 59, 0.7);
}
100% {
background-position: 100% 100%;
body {
background-color: var(--primary-bg);
color: var(--text-main);
font-family: 'Inter', sans-serif;
margin: 0;
min-height: 100vh;
background-image:
radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 40%),
radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 40%);
}
}
main {
padding: 2rem;
}
.card {
background: var(--card-bg-color);
border: 1px solid var(--card-border-color);
border-radius: 16px;
padding: 2.5rem 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}
h1 {
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
font-weight: 700;
margin: 0 0 1.2rem;
letter-spacing: -0.02em;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
opacity: 0.92;
}
.loader {
margin: 1.5rem auto;
width: 56px;
height: 56px;
border: 4px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
.navbar {
background: var(--glass-bg);
backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border-color);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
z-index: 100;
}
}
.runtime code {
background: rgba(0, 0, 0, 0.25);
padding: 0.15rem 0.45rem;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.logo {
font-weight: 700;
font-size: 1.25rem;
color: var(--accent-blue);
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.logo span { color: var(--text-main); }
footer {
position: absolute;
bottom: 1rem;
width: 100%;
text-align: center;
font-size: 0.85rem;
opacity: 0.75;
}
.hero {
text-align: center;
padding: 4rem 2rem 2rem;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1rem;
background: linear-gradient(to right, var(--accent-blue), var(--accent-green));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 800;
}
.hero p {
color: var(--text-muted);
max-width: 600px;
margin: 0 auto 2rem;
font-size: 1.1rem;
}
.editor-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem 4rem;
}
@media (max-width: 768px) {
.editor-container { grid-template-columns: 1fr; }
}
.editor-pane {
background: var(--secondary-bg);
border: 1px solid var(--border-color);
border-radius: 12px;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.editor-header {
padding: 0.75rem 1rem;
background: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-muted);
}
textarea {
background: transparent;
border: none;
color: #e2e8f0;
font-family: 'JetBrains Mono', monospace;
padding: 1rem;
resize: none;
height: 400px;
outline: none;
font-size: 0.9rem;
line-height: 1.5;
}
.btn-obfuscate {
grid-column: span 2;
background: linear-gradient(to right, var(--accent-blue), #2563eb);
color: white;
border: none;
padding: 1rem 2rem;
border-radius: 8px;
font-weight: 700;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.2s;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: -1rem;
box-shadow: 0 4px 14px 0 rgba(56, 189, 248, 0.39);
}
@media (max-width: 768px) { .btn-obfuscate { grid-column: span 1; } }
.btn-obfuscate:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
filter: brightness(1.1);
}
.btn-obfuscate:active { transform: translateY(0); }
.copy-btn {
background: transparent;
border: 1px solid var(--border-color);
color: var(--text-muted);
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
cursor: pointer;
}
.copy-btn:hover { color: var(--text-main); border-color: var(--text-muted); }
.badge {
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.7rem;
text-transform: uppercase;
}
.badge-blue { background: rgba(56, 189, 248, 0.1); color: var(--accent-blue); }
.badge-green { background: rgba(34, 197, 94, 0.1); color: var(--accent-green); }
footer {
text-align: center;
padding: 2rem;
color: var(--text-muted);
font-size: 0.875rem;
border-top: 1px solid var(--border-color);
}
</style>
{% endblock %}
{% block content %}
<main>
<div class="card">
<h1>Analyzing your requirements and generating your app…</h1>
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
<span class="sr-only">Loading…</span>
<nav class="navbar">
<a href="/" class="logo">VM-<span>LUAU</span></a>
<div>
<a href="/admin/" style="color: var(--text-muted); text-decoration: none; font-size: 0.875rem;">Admin Access</a>
</div>
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
<p class="runtime">
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
</p>
</div>
</main>
</nav>
<section class="hero">
<h1>Next-Gen Luau Protection</h1>
<p>Secure your Roblox scripts with our custom Virtual Machine obfuscation. Harder to reverse-engineer, impossible to ignore.</p>
</section>
<form method="POST" class="editor-container">
{% csrf_token %}
<div class="editor-pane">
<div class="editor-header">
<span>INPUT.LUAU</span>
<span class="badge badge-blue">Source</span>
</div>
<textarea name="code" placeholder="-- Paste your Luau code here..." required>{{ input_code }}</textarea>
</div>
<div class="editor-pane">
<div class="editor-header">
<span>PROTECTED.LUAU</span>
<button type="button" class="copy-btn" onclick="copyOutput()">Copy Code</button>
</div>
<textarea id="output-area" readonly placeholder="-- Obfuscated code will appear here...">{{ output_code }}</textarea>
</div>
<button type="submit" class="btn-obfuscate">Obfuscate Script</button>
</form>
<footer>
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
&copy; 2026 {{ agent_brand }} | Built with Django & VM Technology
</footer>
{% endblock %}
<script>
function copyOutput() {
const output = document.getElementById('output-area');
output.select();
document.execCommand('copy');
alert('Copied to clipboard!');
}
</script>
{% endblock %}

View File

@ -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)