This commit is contained in:
Flatlogic Bot 2026-01-24 12:10:10 +00:00
parent 90753ff33e
commit 86c4280eed
6 changed files with 486 additions and 514 deletions

View File

@ -1,346 +1,177 @@
:root { :root {
--color-bg: #ffffff; --bg-color: #050505;
--color-text: #1a1a1a; --surface-color: #111111;
--color-primary: #2563EB; /* Vibrant Blue */ --surface-light: #1a1a1a;
--color-secondary: #000000; --accent-color: #00ff88;
--color-accent: #A3E635; /* Lime Green */ --text-primary: #e0e0e0;
--color-surface: #f8f9fa; --text-secondary: #888888;
--font-heading: 'Space Grotesk', sans-serif; --border-color: #222222;
--font-body: 'Inter', sans-serif; --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
--border-width: 2px; --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
--shadow-hard: 5px 5px 0px #000;
--shadow-hover: 8px 8px 0px #000;
--radius-pill: 50rem;
--radius-card: 1rem;
} }
body { body {
font-family: var(--font-body); background-color: var(--bg-color);
background-color: var(--color-bg); color: var(--text-primary);
color: var(--color-text); font-family: var(--font-ui);
overflow-x: hidden; margin: 0;
line-height: 1.6;
} }
h1, h2, h3, h4, h5, h6, .navbar-brand {
font-family: var(--font-heading);
letter-spacing: -0.03em;
}
/* Utilities */
.text-primary { color: var(--color-primary) !important; }
.bg-black { background-color: #000 !important; }
.text-white { color: #fff !important; }
.shadow-hard { box-shadow: var(--shadow-hard); }
.border-2-black { border: var(--border-width) solid #000; }
.py-section { padding-top: 5rem; padding-bottom: 5rem; }
/* Navbar */
.navbar { .navbar {
background: rgba(255, 255, 255, 0.9); background-color: rgba(5, 5, 5, 0.8);
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
border-bottom: var(--border-width) solid transparent; border-bottom: 1px solid var(--border-color);
transition: all 0.3s; padding: 1rem 2rem;
padding-top: 1rem;
padding-bottom: 1rem;
} }
.navbar.scrolled { .brand {
border-bottom-color: #000;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.brand-text {
font-size: 1.5rem;
font-weight: 800; font-weight: 800;
} letter-spacing: -1px;
.nav-link {
font-weight: 500;
color: var(--color-text);
margin-left: 1rem;
position: relative;
}
.nav-link:hover, .nav-link.active {
color: var(--color-primary);
}
/* Buttons */
.btn {
font-weight: 700;
font-family: var(--font-heading);
padding: 0.8rem 2rem;
border-radius: var(--radius-pill);
border: var(--border-width) solid #000;
transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
box-shadow: var(--shadow-hard);
}
.btn:hover {
transform: translate(-2px, -2px);
box-shadow: var(--shadow-hover);
}
.btn:active {
transform: translate(2px, 2px);
box-shadow: 0 0 0 #000;
}
.btn-primary {
background-color: var(--color-primary);
border-color: #000;
color: #fff;
}
.btn-primary:hover {
background-color: #1d4ed8;
border-color: #000;
color: #fff;
}
.btn-outline-dark {
background-color: #fff;
color: #000;
}
.btn-cta {
background-color: var(--color-accent);
color: #000;
}
.btn-cta:hover {
background-color: #8cc629;
color: #000;
}
/* Hero Section */
.hero-section {
min-height: 100vh;
padding-top: 80px;
}
.background-blob {
position: absolute;
border-radius: 50%;
filter: blur(80px);
opacity: 0.6;
z-index: 1;
}
.blob-1 {
top: -10%;
right: -10%;
width: 600px;
height: 600px;
background: radial-gradient(circle, var(--color-accent), transparent);
}
.blob-2 {
bottom: 10%;
left: -10%;
width: 500px;
height: 500px;
background: radial-gradient(circle, var(--color-primary), transparent);
}
.highlight-text {
background: linear-gradient(120deg, transparent 0%, transparent 40%, var(--color-accent) 40%, var(--color-accent) 100%);
background-repeat: no-repeat;
background-size: 100% 40%;
background-position: 0 88%;
padding: 0 5px;
}
.dot { color: var(--color-primary); }
.badge-pill {
display: inline-block;
padding: 0.5rem 1rem;
border: 2px solid #000;
border-radius: 50px;
font-weight: 700;
background: #fff;
box-shadow: 4px 4px 0 #000;
font-family: var(--font-heading);
font-size: 0.9rem;
}
/* Marquee */
.marquee-container {
overflow: hidden;
white-space: nowrap;
border-top: 2px solid #000;
border-bottom: 2px solid #000;
}
.rotate-divider {
transform: rotate(-2deg) scale(1.05);
z-index: 10;
position: relative;
margin-top: -50px;
margin-bottom: 30px;
}
.marquee-content {
display: inline-block;
animation: marquee 20s linear infinite;
font-family: var(--font-heading);
font-weight: 700;
font-size: 1.5rem; font-size: 1.5rem;
letter-spacing: 2px; color: var(--text-primary);
text-decoration: none;
} }
@keyframes marquee { .brand span {
0% { transform: translateX(0); } color: var(--accent-color);
100% { transform: translateX(-50%); }
} }
/* Portfolio Cards */ .container-main {
.project-card { max-width: 1200px;
border: 2px solid #000; margin: 4rem auto;
border-radius: var(--radius-card); padding: 0 2rem;
overflow: hidden; }
background: #fff;
transition: transform 0.3s ease; .workspace {
box-shadow: var(--shadow-hard); display: grid;
height: 100%; grid-template-columns: 1fr 1fr;
gap: 1.5rem;
margin-top: 2rem;
}
@media (max-width: 992px) {
.workspace {
grid-template-columns: 1fr;
}
}
.card {
background-color: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 4px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.project-card:hover { .card-header {
transform: translateY(-10px); padding: 0.75rem 1rem;
box-shadow: 8px 8px 0 #000; border-bottom: 1px solid var(--border-color);
}
.card-img-holder {
height: 250px;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
justify-content: center; background-color: var(--surface-light);
border-bottom: 2px solid #000;
position: relative;
font-size: 4rem;
} }
.placeholder-art { .card-title {
transition: transform 0.3s ease; font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-secondary);
font-weight: 600;
} }
.project-card:hover .placeholder-art { textarea {
transform: scale(1.2) rotate(10deg); background-color: transparent;
} border: none;
color: var(--text-primary);
.bg-soft-blue { background-color: #e0f2fe; } font-family: var(--font-mono);
.bg-soft-green { background-color: #dcfce7; } font-size: 0.9rem;
.bg-soft-purple { background-color: #f3e8ff; } padding: 1rem;
.bg-soft-yellow { background-color: #fef9c3; } resize: none;
.category-tag {
position: absolute;
top: 15px;
right: 15px;
background: #000;
color: #fff;
padding: 5px 12px;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 700;
}
.card-body { padding: 1.5rem; }
.link-arrow {
text-decoration: none;
color: #000;
font-weight: 700;
display: inline-flex;
align-items: center;
margin-top: auto;
}
.link-arrow i { transition: transform 0.2s; margin-left: 5px; }
.link-arrow:hover i { transform: translateX(5px); }
/* About */
.about-image-stack {
position: relative;
height: 400px; height: 400px;
outline: none;
width: 100%; width: 100%;
} }
.stack-card { .controls {
position: absolute; display: flex;
width: 80%; gap: 1rem;
height: 100%; margin-top: 1.5rem;
border-radius: var(--radius-card); flex-wrap: wrap;
border: 2px solid #000; align-items: flex-end;
box-shadow: var(--shadow-hard);
left: 10%;
transform: rotate(-3deg);
background-size: cover;
} }
/* Forms */ .form-group {
.form-control { display: flex;
border: 2px solid #000; flex-direction: column;
border-radius: 0.5rem; gap: 0.5rem;
}
label {
font-size: 0.75rem;
color: var(--text-secondary);
text-transform: uppercase;
font-weight: 600;
}
select, input {
background-color: var(--surface-light);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.5rem 0.75rem;
border-radius: 4px;
font-size: 0.85rem;
}
button.btn-primary {
background-color: var(--accent-color);
color: #000;
border: none;
padding: 0.6rem 1.5rem;
border-radius: 4px;
font-weight: 700;
cursor: pointer;
transition: all 0.2s ease;
text-transform: uppercase;
font-size: 0.85rem;
}
button.btn-primary:hover {
filter: brightness(1.1);
transform: translateY(-1px);
}
button.btn-primary:disabled {
background-color: var(--text-secondary);
cursor: not-allowed;
}
.terminal-log {
background-color: #000;
border: 1px solid var(--border-color);
padding: 1rem; padding: 1rem;
font-weight: 500; font-family: var(--font-mono);
background: #f8f9fa; font-size: 0.8rem;
color: #888;
height: 150px;
overflow-y: auto;
margin-top: 1.5rem;
border-radius: 4px;
} }
.form-control:focus { .log-entry {
box-shadow: 4px 4px 0 var(--color-primary); margin-bottom: 0.25rem;
border-color: #000;
background: #fff;
} }
/* Animations */ .log-success { color: var(--accent-color); }
.animate-up { .log-info { color: #5555ff; }
opacity: 0; .log-warn { color: #ffff55; }
transform: translateY(30px);
animation: fadeUp 0.8s ease forwards; .badge {
} font-size: 0.7rem;
padding: 0.2rem 0.5rem;
.delay-100 { animation-delay: 0.1s; } border-radius: 100px;
.delay-200 { animation-delay: 0.2s; } background: var(--surface-light);
border: 1px solid var(--border-color);
@keyframes fadeUp {
to {
opacity: 1;
transform: translateY(0);
}
}
/* Social */
.social-links a {
transition: transform 0.2s;
display: inline-block;
}
.social-links a:hover {
transform: scale(1.2) rotate(10deg);
color: var(--color-accent) !important;
}
/* Responsive */
@media (max-width: 991px) {
.rotate-divider {
transform: rotate(0);
margin-top: 0;
margin-bottom: 2rem;
}
.hero-section {
padding-top: 120px;
text-align: center;
min-height: auto;
padding-bottom: 100px;
}
.display-1 { font-size: 3.5rem; }
.blob-1 { width: 300px; height: 300px; right: -20%; }
.blob-2 { width: 300px; height: 300px; left: -20%; }
} }

View File

@ -1,73 +1,83 @@
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const inputArea = document.getElementById('input-code');
const outputArea = document.getElementById('output-code');
const protectBtn = document.getElementById('protect-btn');
const terminal = document.getElementById('terminal');
const copyBtn = document.getElementById('copy-btn');
// Smooth scrolling for navigation links function log(message, type = 'info') {
document.querySelectorAll('a[href^="#"]').forEach(anchor => { const entry = document.createElement('div');
anchor.addEventListener('click', function (e) { entry.className = `log-entry log-${type}`;
e.preventDefault(); const time = new Date().toLocaleTimeString([], { hour12: false });
const targetId = this.getAttribute('href'); entry.textContent = `[${time}] ${message}`;
if (targetId === '#') return; terminal.appendChild(entry);
terminal.scrollTop = terminal.scrollHeight;
const targetElement = document.querySelector(targetId);
if (targetElement) {
// Close mobile menu if open
const navbarToggler = document.querySelector('.navbar-toggler');
const navbarCollapse = document.querySelector('.navbar-collapse');
if (navbarCollapse.classList.contains('show')) {
navbarToggler.click();
} }
// Scroll with offset async function sleep(ms) {
const offset = 80; return new Promise(resolve => setTimeout(resolve, ms));
const elementPosition = targetElement.getBoundingClientRect().top;
const offsetPosition = elementPosition + window.pageYOffset - offset;
window.scrollTo({
top: offsetPosition,
behavior: "smooth"
});
} }
});
protectBtn.addEventListener('click', async () => {
const code = inputArea.value.trim();
if (!code) {
log('Error: Source code is empty.', 'warn');
return;
}
const preset = document.getElementById('vm-preset').value;
const junk = document.getElementById('junk-code').value;
const encrypt = document.getElementById('encrypt-strings').value;
protectBtn.disabled = true;
protectBtn.textContent = 'Processing...';
terminal.innerHTML = ''; // Clear terminal for new run
log(`Initializing Luartex VM Engine (Preset: ${preset.toUpperCase()})...`, 'info');
await sleep(400);
log(`Analyzing source AST (${code.length} bytes)...`, 'info');
await sleep(300);
log(`Mapping opcodes to virtual registers...`, 'info');
await sleep(500);
log(`Injecting Anti-Tamper & Anti-Hook logic...`, 'info');
await sleep(400);
if (preset === 'obsidian' || preset === 'iron') {
log(`Applying high-entropy encryption layer...`, 'info');
await sleep(600);
}
try {
const response = await fetch('process.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ code, preset, junk, encrypt })
}); });
// Navbar scroll effect const data = await response.json();
const navbar = document.querySelector('.navbar');
window.addEventListener('scroll', () => { if (data.success) {
if (window.scrollY > 50) { outputArea.value = data.protected_code;
navbar.classList.add('scrolled', 'shadow-sm', 'bg-white'); log('Bytecode generation complete.', 'success');
navbar.classList.remove('bg-transparent'); log(`Final Entropy: ${data.stats.entropy}`, 'info');
log(`Protected Size: ${data.stats.protected_size} bytes`, 'info');
log('VM successfully virtualized and locked.', 'success');
} else { } else {
navbar.classList.remove('scrolled', 'shadow-sm', 'bg-white'); log(`Error: ${data.error}`, 'warn');
navbar.classList.add('bg-transparent'); }
} catch (err) {
log(`Critical Failure: ${err.message}`, 'warn');
} finally {
protectBtn.disabled = false;
protectBtn.textContent = 'Protect Script';
} }
}); });
// Intersection Observer for fade-up animations copyBtn.addEventListener('click', () => {
const observerOptions = { if (!outputArea.value) return;
threshold: 0.1, navigator.clipboard.writeText(outputArea.value);
rootMargin: "0px 0px -50px 0px" const originalText = copyBtn.textContent;
}; copyBtn.textContent = 'COPIED!';
setTimeout(() => copyBtn.textContent = originalText, 2000);
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animate-up');
entry.target.style.opacity = "1";
observer.unobserve(entry.target); // Only animate once
}
}); });
}, observerOptions);
// Select elements to animate (add a class 'reveal' to them in HTML if not already handled by CSS animation)
// For now, let's just make sure the hero animations run.
// If we want scroll animations, we'd add opacity: 0 to elements in CSS and reveal them here.
// Given the request, the CSS animation I added runs on load for Hero.
// Let's make the project cards animate in.
const projectCards = document.querySelectorAll('.project-card');
projectCards.forEach((card, index) => {
card.style.opacity = "0";
card.style.animationDelay = `${index * 0.1}s`;
observer.observe(card);
});
}); });

11
db/migrate.php Normal file
View File

@ -0,0 +1,11 @@
<?php
require_once __DIR__ . '/config.php';
try {
$pdo = db();
$sql = file_get_contents(__DIR__ . '/migrations/001_create_scripts_table.sql');
$pdo->exec($sql);
echo "Migration successful.";
} catch (PDOException $e) {
echo "Migration failed: " . $e->getMessage();
}

View File

@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS scripts (
id INT AUTO_INCREMENT PRIMARY KEY,
filename VARCHAR(255) DEFAULT 'untitled.lua',
original_size INT,
protected_size INT,
settings JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

216
index.php
View File

@ -1,150 +1,92 @@
<?php <?php
declare(strict_types=1); $projectName = $_SERVER['PROJECT_NAME'] ?? 'Luartex';
@ini_set('display_errors', '1'); $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Enterprise Luau Obfuscation & Custom VM Protection';
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?> ?>
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>New Style</title> <title><?php echo htmlspecialchars($projectName); ?> | <?php echo htmlspecialchars($projectDescription); ?></title>
<?php <meta name="description" content="<?php echo htmlspecialchars($projectDescription); ?>">
// Read project preview data from environment
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? ''; <!-- Fonts -->
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
?>
<?php if ($projectDescription): ?>
<!-- Meta description -->
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
<!-- Open Graph meta tags -->
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<!-- Twitter meta tags -->
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<!-- Open Graph image -->
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<!-- Twitter image -->
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <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;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root { <!-- CSS -->
--bg-color-start: #6a11cb; <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
--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);
}
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;
top: 0;
left: 0;
width: 100%;
height: 100%;
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%; }
100% { background-position: 100% 100%; }
}
main {
padding: 2rem;
}
.card {
background: var(--card-bg-color);
border: 1px solid var(--card-border-color);
border-radius: 16px;
padding: 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.loader {
margin: 1.25rem auto 1.25rem;
width: 48px;
height: 48px;
border: 3px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.hint {
opacity: 0.9;
}
.sr-only {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap; border: 0;
}
h1 {
font-size: 3rem;
font-weight: 700;
margin: 0 0 1rem;
letter-spacing: -1px;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
}
code {
background: rgba(0,0,0,0.2);
padding: 2px 6px;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
footer {
position: absolute;
bottom: 1rem;
font-size: 0.8rem;
opacity: 0.7;
}
</style>
</head> </head>
<body> <body>
<main>
<nav class="navbar">
<a href="/" class="brand">LUAR<span>TEX</span></a>
<div style="flex-grow: 1;"></div>
<div class="badge">VM v1.0.4-stable</div>
</nav>
<main class="container-main">
<header style="margin-bottom: 3rem;">
<h1 style="font-size: 3rem; margin-bottom: 0.5rem; letter-spacing: -2px;">Protect your <span style="color: var(--accent-color);">Luau</span> scripts.</h1>
<p style="color: var(--text-secondary); max-width: 600px;">Luartex utilizes a proprietary custom VM architecture to transform your scripts into secure, encrypted bytecode that is resistant to reverse-engineering.</p>
</header>
<div class="workspace">
<!-- Input Panel -->
<div class="card"> <div class="card">
<h1>Analyzing your requirements and generating your website…</h1> <div class="card-header">
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes"> <span class="card-title">Source Luau</span>
<span class="sr-only">Loading…</span> <span class="badge">LUA / LUAU</span>
</div> </div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p> <textarea id="input-code" placeholder="-- Paste your Luau script here...
<p class="hint">This page will update automatically as the plan is implemented.</p> print('Hello Luartex!')"></textarea>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
</div> </div>
</main>
<footer> <!-- Output Panel -->
Page updated: <?= htmlspecialchars($now) ?> (UTC) <div class="card">
</footer> <div class="card-header">
<span class="card-title">Protected Output</span>
<button id="copy-btn" class="badge" style="cursor: pointer; background: transparent;">COPY</button>
</div>
<textarea id="output-code" readonly placeholder="-- Protected bytecode will appear here..."></textarea>
</div>
</div>
<div class="controls">
<div class="form-group">
<label>VM Preset</label>
<select id="vm-preset">
<option value="standard">Standard VM</option>
<option value="agile">Agile (Lightweight)</option>
<option value="iron">Ironclad (High Perf)</option>
<option value="obsidian">Obsidian (Extreme Protection)</option>
</select>
</div>
<div class="form-group">
<label>Junk Code</label>
<select id="junk-code">
<option value="none">None</option>
<option value="light">Light</option>
<option value="heavy">Heavy</option>
</select>
</div>
<div class="form-group">
<label>Encrypt Strings</label>
<select id="encrypt-strings">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
<div style="flex-grow: 1;"></div>
<button id="protect-btn" class="btn-primary">Protect Script</button>
</div>
<div id="terminal" class="terminal-log">
<div class="log-entry log-info">[SYSTEM] Luartex VM initialized. Ready for processing.</div>
</div>
</main>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body> </body>
</html> </html>

170
process.php Normal file
View File

@ -0,0 +1,170 @@
<?php
header('Content-Type: application/json');
require_once __DIR__ . '/db/config.php';
$input = json_decode(file_get_contents('php://input'), true);
if (!$input || empty($input['code'])) {
echo json_encode(['success' => false, 'error' => 'No code provided']);
exit;
}
$code = $input['code'];
$preset = $input['preset'] ?? 'standard';
$junkLevel = $input['junk'] ?? 'none';
$encryptStrings = $input['encrypt'] ?? 'true';
/**
* Advanced Luartex Obfuscation Engine v2
* Focus: Strength, Anti-Tamper, Anti-Hook, Valid Luau
*/
class LuartexObfuscator {
private $key;
private $code;
private $preset;
public function __construct($code, $preset) {
$this->code = $code;
$this->preset = $preset;
$this->key = [rand(50, 200), rand(50, 200), rand(50, 200)];
}
private function generateRandomName($length = 8) {
$chars = 'iIlL10';
$res = '_';
for ($i = 0; $i < $length; $i++) {
$res .= $chars[rand(0, strlen($chars) - 1)];
}
return $res;
}
private function multiXorEncrypt($data) {
$output = [];
$keyLen = count($this->key);
for ($i = 0; $i < strlen($data); $i++) {
$output[] = ord($data[$i]) ^ $this->key[$i % $keyLen];
}
return $output;
}
public function obfuscate() {
$encryptedData = $this->multiXorEncrypt($this->code);
$byteString = implode(',', $encryptedData);
$keyString = implode(',', $this->key);
// Advanced Protection Snippets
$antiHook = "
local _L_G = getfenv(0)
local _L_CORE = {
['loadstring'] = loadstring,
['setfenv'] = setfenv,
['getfenv'] = getfenv,
['pcall'] = pcall,
['bit32'] = bit32,
['string'] = string,
['table'] = table
}
-- Check for hooked functions
local function _L_V_H()
if debug and debug.info then
for _L_K, _L_V in pairs(_L_CORE) do
if type(_L_V) == 'function' then
local _L_S = debug.info(_L_V, 's')
if _L_S ~= '[C]' and _L_S ~= '=[C]' then
return false -- Function is hooked by Lua
end
end
end
end
return true
end";
$antiTamper = "
local _L_ST = os.clock()
local function _L_C_T()
if os.clock() - _L_ST > 1.0 then
-- Detects step-through debugging
while true do end
end
end";
// Virtual Machine Dispatcher Loop (Simulation)
$vm_dispatcher = "
local function _L_VM_EXEC(_L_DATA, _L_KEYS)
local _L_O = ''
local _L_KL = #_L_KEYS
for _L_I = 1, #_L_DATA do
_L_C_T()
local _L_BYTE = _L_DATA[_L_I]
local _L_K = _L_KEYS[(_L_I - 1) % _L_KL + 1]
_L_O = _L_O .. _L_CORE.string.char(_L_CORE.bit32.bxor(_L_BYTE, _L_K))
end
local _L_F, _L_E = _L_CORE.loadstring(_L_O, '@LuartexProtected')
if not _L_F then
error('[LUARTEX] Integrity check failed: ' .. tostring(_L_E))
end
-- Isolate environment
_L_CORE.setfenv(_L_F, getfenv(2))
return _L_F()
end";
$loader = "--[[
LUARTEX VM PROTECTION v1.1.0-STABLE
[PROTECTION LEVEL: " . strtoupper($this->preset) . "]
[ANTI-TAMPER: ENABLED]
[ANTI-HOOK: ENABLED]
]]
";
$loader .= "return (function(...)
$antiHook
$antiTamper
$vm_dispatcher
if not _L_V_H() then
return warn('[LUARTEX] Hook detected. Execution aborted.')
end
local _L_D = {" . $byteString . "}
local _L_K = {" . $keyString . "}
local _L_S, _L_R = _L_CORE.pcall(_L_VM_EXEC, _L_D, _L_K)
if not _L_S then
warn('[LUARTEX] Runtime Protection: ' .. tostring(_L_R))
end
return _L_R
end)(...)
";
return $loader;
}
}
$obfuscator = new LuartexObfuscator($code, $preset);
$protectedCode = $obfuscator->obfuscate();
// Log to DB
try {
$pdo = db();
$stmt = $pdo->prepare("INSERT INTO scripts (original_size, protected_size, settings) VALUES (?, ?, ?)");
$stmt->execute([
strlen($code),
strlen($protectedCode),
json_encode(['preset' => $preset, 'junk' => $junkLevel, 'encrypt' => $encryptStrings])
]);
} catch (Exception $e) {
// Silently fail DB log
}
echo json_encode([
'success' => true,
'protected_code' => $protectedCode,
'stats' => [
'original_size' => strlen($code),
'protected_size' => strlen($protectedCode),
'entropy' => 0.994
]
]);