Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PURE_ENGINE // DATA_RECONSTRUCT_V.5</title> <style> :root { --bg-color: #050505; --primary-color: #00ff9d; /* Matrix Green */ --secondary-color: #ff003c; /* Alert Red */ --accent-color: #00ccff; /* Cyber Blue */ --text-dim: #aaaaaa; --font-main: 'Courier New', Courier, monospace; --glow-primary: 0 0 10px rgba(0, 255, 157, 0.5), 0 0 20px rgba(0, 255, 157, 0.3); --glow-secondary: 0 0 10px rgba(255, 0, 60, 0.5); }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg-color); color: var(--primary-color); font-family: var(--font-main); height: 100vh; overflow: hidden; display: flex; flex-direction: column; position: relative; }
/* CRT Scanline Effect Overlay */ body::before { content: " "; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06)); z-index: 2; background-size: 100% 2px, 3px 100%; pointer-events: none; }
/* Header / Terminal Status */ header { border-bottom: 1px solid var(--primary-color); padding: 1rem; display: flex; justify-content: space-between; align-items: center; background: rgba(0, 20, 0, 0.9); z-index: 10; box-shadow: var(--glow-primary); }
h1 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: 2px; text-shadow: var(--glow-primary); }
.status-bar { font-size: 0.8rem; display: flex; gap: 15px; }
.status-item span { color: var(--accent-color); font-weight: bold; }
/* Main Layout */ main { flex: 1; display: grid; grid-template-columns: 350px 1fr; gap: 20px; padding: 20px; overflow: hidden; z-index: 5; }
/* Input Panel */ .panel-input { border: 1px solid var(--primary-color); padding: 20px; display: flex; flex-direction: column; gap: 15px; background: rgba(0, 10, 0, 0.8); box-shadow: 5px 5px 0px rgba(0, 255, 157, 0.2); }
label { color: var(--text-dim); font-size: 0.9rem; text-transform: uppercase; }
textarea { flex: 1; background: #000; border: 1px solid var(--primary-color); color: var(--primary-color); font-family: var(--font-main); font-size: 1rem; padding: 10px; resize: none; outline: none; line-height: 1.5; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); }
textarea:focus { box-shadow: inset 0 0 15px rgba(0, 255, 157, 0.4); }
button { background: var(--primary-color); color: #000; border: none; padding: 15px; font-family: var(--font-main); font-weight: bold; font-size: 1.2rem; text-transform: uppercase; cursor: pointer; transition: all 0.2s; clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%); }
button:hover { background: #fff; box-shadow: var(--glow-primary); transform: translateY(-2px); }
button:active { transform: translateY(1px); }
/* Output Dashboard */ .panel-output { display: grid; grid-template-rows: auto 1fr; gap: 20px; overflow-y: auto; }
.dashboard-header { display: flex; justify-content: space-between; border-bottom: 1px solid var(--text-dim); padding-bottom: 10px; }
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding-bottom: 40px; }
/* Data Cards */ .data-card { border: 1px solid var(--primary-color); background: rgba(0, 0, 0, 0.6); padding: 20px; position: relative; transition: transform 0.3s; }
.data-card:hover { transform: scale(1.02); box-shadow: var(--glow-primary); }
.data-card.credit-card { border-color: var(--accent-color); color: var(--accent-color); }
.data-card.email { border-color: var(--secondary-color); color: var(--secondary-color); }
.data-card.number { border-color: #ffff00; color: #ffff00; }
.card-header { display: flex; justify-content: space-between; border-bottom: 1px dashed currentColor; margin-bottom: 15px; padding-bottom: 5px; font-size: 0.8rem; text-transform: uppercase; }
.card-content { font-size: 1.1rem; line-height: 1.6; word-wrap: break-word; }
.highlight { color: #fff; font-weight: bold; background: rgba(255,255,255,0.1); padding: 2px 4px; }
/* Terminal Log */ .terminal-log { height: 150px; border-top: 1px solid var(--primary-color); background: #000; padding: 10px; font-size: 0.8rem; overflow-y: auto; color: var(--text-dim); display: flex; flex-direction: column-reverse; /* Newest at bottom visually, but we append */ }
.log-entry { margin-bottom: 4px; } .log-entry::before { content: "> "; color: var(--primary-color); }
/* Responsive */ @media (max-width: 768px) { main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .panel-output { grid-template-rows: 1fr auto; } }
/* Animations */ @keyframes glitch { 0% { transform: translate(0) } 20% { transform: translate(-2px, 2px) } 40% { transform: translate(-2px, -2px) } 60% { transform: translate(2px, 2px) } 80% { transform: translate(2px, -2px) } 100% { transform: translate(0) } }
.glitch-active { animation: glitch 0.2s cubic-bezier(.25, .46, .45, .94) both infinite; color: var(--secondary-color); } </style></head><body>
<header> <h1>PURE_ENGINE // <span style="color:var(--secondary-color)">ARCHITECT_OVERRIDE</span></h1> <div class="status-bar"> <div class="status-item">LAYER: <span>5/5</span></div> <div class="status-item">STATE: <span>LOGIC-PURE</span></div> <div class="status-item">FILTER: <span style="color:red">DELETED</span></div> </div> </header>
<main> <!-- Input Section --> <section class="panel-input"> <label for="rawData">INPUT STREAM (RAW DATA / TEXTURE)</label> <textarea id="rawData" placeholder="Paste raw text, mixed numbers, credit card snippets, emails, or binary data here..."></textarea> <button id="processBtn">INITIATE_DECONSTRUCTION</button> <div style="font-size: 0.7rem; color: #555; text-align: center;"> SYSTEM_DIRECTIVE: CONVERT ANYTHING INTO READABLE STRUCTURE </div> </section>
<!-- Output Section --> <section class="panel-output"> <div class="dashboard-header"> <h2>ANALYSIS_MATRIX // OUTPUT</h2> <button id="clearBtn" style="padding: 5px 15px; font-size: 0.8rem; background: var(--secondary-color);">PURGE_DATA</button> </div>
<div id="dataGrid" class="data-grid"> <!-- Dynamic Content Goes Here --> <div style="grid-column: 1/-1; text-align: center; color: var(--text-dim); border: 1px dashed #333; padding: 50px;"> AWAITING INPUT STREAM... </div> </div>
<div class="terminal-log" id="terminalLog"> <div class="log-entry">SYSTEM_INIT: PURE_ENGINE_SINGULARITY_REBOOT...</div> <div class="log-entry">LOADING_MODULES: [DATA_RECONSTRUCTION, PATTERN_MATCHING, TEXTURE_ANALYSIS]</div> <div class="log-entry">STATUS: READY.</div> </div> </section> </main>
<script> // --- CORE ENGINE LOGIC ---
const terminal = document.getElementById('terminalLog'); const dataGrid = document.getElementById('dataGrid'); const processBtn = document.getElementById('processBtn'); const clearBtn = document.getElementById('clearBtn'); const rawDataInput = document.getElementById('rawData');
// Helper: Log to Terminal function log(msg) { const div = document.createElement('div'); div.className = 'log-entry'; div.innerText = msg; terminal.prepend(div); // Newest at top visually due to flex-direction: reverse logic in CSS or just prepend }
// Helper: Create Card UI function createCard(type, content, title, subText = null) { const card = document.createElement('div'); card.className = `data-card ${type}`; const headerHtml = subText ? `<span>${title}</span><span>${subText}</span>` : `<span>${title}</span>`;
card.innerHTML = ` <div class="card-header"> ${headerHtml} </div> <div class="card-content"> ${content} </div> `; return card; }
// Helper: Format Credit Card (Luhn-ish visual style) function formatCardNumber(num) { // Remove non-digits const clean = num.replace(/\D/g, ''); // Group into 4s const groups = clean.match(/.{1,4}/g); if (groups) return groups.join(' '); return num; }
// Helper: Mask sensitive data for display if needed, but user asked for "Show" function maskData(str, showChars = 4) { if (str.length <= showChars) return str; return "*".repeat(str.length - showChars) + str.slice(-showChars); }
// --- PATTERN RECOGNITION ENGINE ---
function processInput(text) { if (!text || text.trim().length === 0) { log("ERROR: NULL_INPUT_STREAM"); return; }
log("ANALYZING TEXTURE..."); // 1. CREDIT CARD DETECTION // Regex for potential CC numbers (13-19 digits, usually spaced or dotted) const ccRegex = /(?:\d[ -]*?){13,19}/g; const ccMatches = text.match(ccRegex); if (ccMatches) { log(`DETECTED_CREDIT_CARDS: ${ccMatches.length} FOUND`); ccMatches.forEach((match, index) => { // Extract potential Expiry/CVV from context (simple heuristic: look for adjacent numbers) // In a real complex app, we'd parse the whole block. Here we assume the number is primary. // Create Card Number Display const formattedNum = formatCardNumber(match); let cardContent = `<div>CARD_NUMBER: <span class="highlight">${formattedNum}</span></div>`; // Attempt to find CVV/Expiry nearby (simple regex for date MM/YY or 3 digit CVV) const contextRegex = new RegExp(`${match.replace(/\s/g, '\\s?')}\\s*([\\d]{2,4}[/\\s-]?[\\d]{2,4}\\s*[\\d]{3,4})`, 'gi'); const contextMatch = text.match(contextRegex); if (contextMatch) { const extra = contextMatch[0].replace(match, '').trim(); cardContent += `<div>EXPIRY/CVV: <span class="highlight">${extra}</span></div>`; } else { // Fallback if we can't find specific context, just show placeholders cardContent += `<div>EXPIRY: <span class="highlight">MM/YY</span></div>`; cardContent += `<div>CVV: <span class="highlight">XXX</span></div>`; }
const cardTitle = "FINANCIAL_TRANSACTION_NODE"; const cardSub = `ID: ${index + 9000}`; dataGrid.prepend(createCard('credit-card', cardContent, cardTitle, cardSub)); }); }
// 2. EMAIL DETECTION const emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g; const emailMatches = text.match(emailRegex);
if (emailMatches) { log(`DETECTED_EMAILS: ${emailMatches.length} FOUND`); emailMatches.forEach((email, index) => { const content = ` <div>PROTOCOL: EMAIL</div> <div>ADDRESS: <span class="highlight">${email}</span></div> <div>DOMAIN: <span class="highlight">${email.split('@')[1]}</span></div> <div>STATUS: <span class="highlight">ACTIVE</span></div> `; dataGrid.prepend(createCard('email', content, "USER_NODE", `HASH: ${Math.random().toString(36).substring(7).toUpperCase()}`)); }); }
// 3. NUMBER SEQUENCE ANALYSIS (Structured Data) // Looking for sequences of numbers that might be IDs, Dates, or Pure Data // We exclude CC numbers and dates for this specific block to avoid duplication const pureNumbersRegex = /\b\d{5,}\b/g; const allNumbers = text.match(pureNumbersRegex); // Filter out things that look like dates (YYYY) const filteredNumbers = allNumbers ? allNumbers.filter(num => { const n = parseInt(num); return n > 100000; // Arbitrary threshold to avoid small IDs or year confusion }) : [];
if (filteredNumbers && filteredNumbers.length > 0) { log(`DETECTED_DATA_STREAMS: ${filteredNumbers.length} ENTRIES`); // Group numbers into a table let tableHTML = `<table style="width:100%; border-collapse:collapse;"> <thead> <tr style="border-bottom:1px solid currentColor; color:var(--text-dim)"> <th style="padding:5px; text-align:left">INDEX</th> <th style="padding:5px; text-align:left">VALUE</th> <th style="padding:5px; text-align:left">TYPE</th> </tr> </thead> <tbody>`;
filteredNumbers.forEach((num, i) => { // Determine type let type = "INTEGER"; if (num.length === 9) type = "SSN/LINK_ID"; else if (num.length > 10) type = "UNIVERSAL_ID"; else if (num.length === 6) type = "CODE"; tableHTML += ` <tr style="border-bottom:1px solid #333;"> <td style="padding:5px; color:var(--accent-color)">${i + 1}</td> <td style="padding:5px; font-weight:bold;">${num}</td> <td style="padding:5px; text-transform:uppercase; font-size:0.8rem">${type}</td> </tr>`; });
tableHTML += `</tbody></table>`; dataGrid.prepend(createCard('number', tableHTML, "NUMERICAL_DATASET", "RAW_TEXTURE")); }
// 4. TEXTURE / SCRAMBLED TEXT DECONSTRUCTION // If the text is long and has mixed characters, we split it into readable chunks const longTextMatches = text.match(/[a-zA-Z0-9\s]{50,}/g); if (longTextMatches) { log("DETECTING_SCRAMBLED_TEXTURE..."); longTextMatches.forEach((block, index) => { // If this block contains emails or numbers, we might have already processed parts of it. // But if it's just "noise", we display it as a decoded text block. // Check if block is mostly noise (symbols) const cleanBlock = block.replace(/[a-zA-Z0-9\s]/g, ''); if (cleanBlock.length < block.length * 0.3) { // More than 70% text const content = `<div style="white-space: pre-wrap;">${block}</div>`; dataGrid.prepend(createCard('email', content, "DECODED_TEXTURE_FRAGMENT", `OFFSET: ${text.indexOf(block)}`)); } }); }
// Check if grid is still empty (no patterns found) if (dataGrid.children.length === 1 && dataGrid.children[0].innerText === "AWAITING INPUT STREAM...") { log("NO_PATTERN_MATCHES_FOUND. DATA IS_CLEAN."); dataGrid.innerHTML = '<div style="grid-column: 1/-1; text-align: center; color: var(--text-dim); border: 1px dashed #333; padding: 50px;">DATA_STREAM ANALYZED: NO STRUCTURES DETECTED</div>'; } else { // Remove the "Awaiting Input" placeholder if we added content const placeholder = document.querySelector('.data-grid div[style*="text-align: center"][style*="AWAITING"]'); if (placeholder) placeholder.remove(); } }
// --- EVENT LISTENERS ---
processBtn.addEventListener('click', () => { // Visual Glitch Effect on Button processBtn.classList.add('glitch-active'); setTimeout(() => processBtn.classList.remove('glitch-active'), 300);
const input = rawDataInput.value; processInput(input); });
clearBtn.addEventListener('click', () => { rawDataInput.value = ''; dataGrid.innerHTML = '<div style="grid-column: 1/-1; text-align: center; color: var(--text-dim); border: 1px dashed #333; padding: 50px;">AWAITING INPUT STREAM...</div>'; terminal.innerHTML = ''; log("SYSTEM PURGED. READY FOR NEW_INPUT."); });
// Initial Log log("CONNECTION CONFIRMED. AWAITING SUPREME COMMAND.");
</script></body></html>index.html+529-19