Spaces:
Paused
Paused
Update templates/index.html
Browse files2 unmodified lines345678935 unmodified lines45464748495051525354552 unmodified lines585960616263646566676869707113 unmodified lines8586878889909155 unmodified lines1471481491501511521531541551561571581591601611621631641651661671681691701711721731741751765 unmodified lines18218318418518618718813 unmodified lines2022032042052062072082092102112122132142152162172182192202 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>APK & Binary Advanced RE Inspector</title><style>* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }body { background-color: #0f172a; color: #f8fafc; padding: 12px; max-width: 100vw; overflow-x: hidden; }35 unmodified lines<body><div class="card"><h2>محلل الهندسة العكسية والتفتيش البرمجي</h2><label for="reFiles" class="file-label" id="fileLabel">اختر ملفات (.so, global-metadata.dat, zip, apk)</label><input type="file" id="reFiles" multiple><button class="btn" id="uploadBtn" onclick="startUploadAndAnalysis()">بدء الرفع والتفتيش العميق</button><div class="stage-box" id="uploadBox"><div class="progress-bar-bg"><div class="progress-bar-fill" id="uploadFill"></div></div>2 unmodified lines</div><div class="card" id="resultsCard" style="display: none;"><h2>ملخص نتائج التفتيش البرمجي</h2><div id="statsSummary" style="font-size:0.85rem; margin-bottom:12px;"></div><!-- الأقسام الثلاثة الرئيسية --><div class="section-tabs"><button class="tab-btn active" onclick="switchSection('LINKS', this)">🔗 الروابط المكتشفة</button><button class="tab-btn" onclick="switchSection('SUSPICIOUS', this)">⚠️ الملفات المشبوهة</button><button class="tab-btn" onclick="switchSection('ENCRYPTED', this)">🔐 الملفات المشفرة</button></div><div id="resultsContainer"></div>13 unmodified linesconst fileInput = document.getElementById('reFiles');const fileLabel = document.getElementById('fileLabel');let globalData = null;let activeSection = 'LINKS';fileInput.onchange = () => {const count = fileInput.files.length;55 unmodified linesxhr.onload = () => {if (xhr.status === 200) {uploadStatusText.innerText = "✅ اكتمل الرفع 100%! جاري التفتيش وفك التشفير البرمجي...";uploadFill.style.width = '100%';const data = JSON.parse(xhr.responseText);if (data.status === "success") {uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش العميق";globalData = data.data;showResults(globalData);} else {alert(data.message);uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش العميق";}} else {alert("حدث خطأ في استجابة الخادم");uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش العميق";}};xhr.onerror = () => {uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش العميق";alert("حدث خطأ في الاتصال الشبكي");};5 unmodified linesdocument.getElementById('resultsCard').style.display = 'block';const summary = data.summary;document.getElementById('statsSummary').innerHTML = `الملفات المفحوصة: <b>${summary.total_files}</b> | الروابط: <b>${summary.total_links}</b> | مشبوهة: <b>${summary.total_suspicious}</b><br>حاسمة (CRITICAL): <span class="badge CRITICAL">${summary.critical_count}</span>عالية (HIGH): <span class="badge HIGH">${summary.high_count}</span>`;13 unmodified linescontainer.innerHTML = '';let list = [];if (sec === 'LINKS') list = globalData.links_found;else if (sec === 'SUSPICIOUS') list = globalData.suspicious_files;else if (sec === 'ENCRYPTED') list = globalData.encrypted_files;list.forEach(item => {let matchesHtml = '';item.items.forEach(m => {const typeOrMethod = m.type || m.method;matchesHtml += `<div class="match-item"><span class="badge ${m.severity}">${m.severity}</span><b>[${typeOrMethod}]</b>: ${escapeHtml(m.value)}<br><span style="color:#94a3b8; font-size:0.7rem;">المقتطف: ${escapeHtml(m.snippet)}</span></div>`;});container.innerHTML += `2 unmodified lines345678935 unmodified lines45464748495051525354552 unmodified lines585960616263646566676869707113 unmodified lines8586878889909155 unmodified lines1471481491501511521531541551561571581591601611621631641651661671681691701711721731741751765 unmodified lines18218318418518618718813 unmodified lines2022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Professional ELF RE Inspector</title><style>* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }body { background-color: #0f172a; color: #f8fafc; padding: 12px; max-width: 100vw; overflow-x: hidden; }35 unmodified lines<body><div class="card"><h2>محلل الهندسة العكسية للمكتبات الأصلية (.SO & Metadata)</h2><label for="reFiles" class="file-label" id="fileLabel">اختر ملفات (.so, global-metadata.dat, zip, apk)</label><input type="file" id="reFiles" multiple><button class="btn" id="uploadBtn" onclick="startUploadAndAnalysis()">بدء الرفع والتفتيش ELF</button><div class="stage-box" id="uploadBox"><div class="progress-bar-bg"><div class="progress-bar-fill" id="uploadFill"></div></div>2 unmodified lines</div><div class="card" id="resultsCard" style="display: none;"><h2>ملخص نتائج التفتيش</h2><div id="statsSummary" style="font-size:0.85rem; margin-bottom:12px;"></div><!-- الأقسام الثلاثة المطلوبة --><div class="section-tabs"><button class="tab-btn active" onclick="switchSection('CRITICAL_LINKS', this)">🔗 الروابط الحرجة</button><button class="tab-btn" onclick="switchSection('SUSPICIOUS_FUNCTIONS', this)">⚙️ الدوال المشبوهة</button><button class="tab-btn" onclick="switchSection('ENCRYPTED_SECTIONS', this)">🔐 الأقسام المشفّرة</button></div><div id="resultsContainer"></div>13 unmodified linesconst fileInput = document.getElementById('reFiles');const fileLabel = document.getElementById('fileLabel');let globalData = null;let activeSection = 'CRITICAL_LINKS';fileInput.onchange = () => {const count = fileInput.files.length;55 unmodified linesxhr.onload = () => {if (xhr.status === 200) {uploadStatusText.innerText = "✅ اكتمل الرفع 100%! جاري تحليل ELF وفك التشفير...";uploadFill.style.width = '100%';const data = JSON.parse(xhr.responseText);if (data.status === "success") {uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش ELF";globalData = data.data;showResults(globalData);} else {alert(data.message);uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش ELF";}} else {alert("حدث خطأ في استجابة الخادم");uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش ELF";}};xhr.onerror = () => {uploadBtn.disabled = false;uploadBtn.innerText = "بدء الرفع والتفتيش ELF";alert("حدث خطأ في الاتصال الشبكي");};5 unmodified linesdocument.getElementById('resultsCard').style.display = 'block';const summary = data.summary;document.getElementById('statsSummary').innerHTML = `الملفات المفحوصة: <b>${summary.total_files}</b> | الروابط: <b>${summary.total_links}</b> | الدوال: <b>${summary.total_functions}</b><br>حاسمة (CRITICAL): <span class="badge CRITICAL">${summary.critical_count}</span>عالية (HIGH): <span class="badge HIGH">${summary.high_count}</span>`;13 unmodified linescontainer.innerHTML = '';let list = [];if (sec === 'CRITICAL_LINKS') list = globalData.critical_links;else if (sec === 'SUSPICIOUS_FUNCTIONS') list = globalData.suspicious_functions;else if (sec === 'ENCRYPTED_SECTIONS') list = globalData.encrypted_sections;list.forEach(item => {let matchesHtml = '';item.items.forEach(m => {if (sec === 'SUSPICIOUS_FUNCTIONS') {matchesHtml += `<div class="match-item"><span class="badge ${m.severity}">${m.severity}</span><b>[Function]</b>: ${escapeHtml(m.function_name)}<br><span style="color:#94a3b8; font-size:0.7rem;">Symbol: ${escapeHtml(m.mangled_symbol)} | Section: ${escapeHtml(m.section)}</span></div>`;} else if (sec === 'ENCRYPTED_SECTIONS') {matchesHtml += `<div class="match-item"><span class="badge ${m.severity}">${m.severity}</span><b>[${escapeHtml(m.method)}]</b>: ${escapeHtml(m.value)}<br><span style="color:#94a3b8; font-size:0.7rem;">${escapeHtml(m.snippet)}</span></div>`;} else {matchesHtml += `<div class="match-item"><span class="badge ${m.severity}">${m.severity}</span><b>[${escapeHtml(m.type)}]</b>: ${escapeHtml(m.value)}<br><span style="color:#94a3b8; font-size:0.7rem;">المقتطف: ${escapeHtml(m.snippet)}</span></div>`;}});container.innerHTML += `
templates/index.html+37-24