This repository was archived by the owner on Apr 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavigate.php
More file actions
496 lines (453 loc) · 21.3 KB
/
navigate.php
File metadata and controls
496 lines (453 loc) · 21.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
<?php
/**
* NAVIGATE.PHP · DECENSORWEB CENTRAL ROUTING
* SECURE NAVIGATION HUB · R-CORP ACCOUNTABILITY
*
* UPDATED NAVIGATION STRUCTURE:
* - INDEX.HTML · Main Terminal
* - ROADMAP.HTML · Project:Overthrow
* - ABOUT.PHP · Decensorweb Manifesto
* - PRIVACY.PHP · Data Sovereignty Protocol
* - CONTACT.PHP · Secure Communications Channel
*
* SECURITY FEATURES:
* - Strict CSP headers with nonce
* - XSS protection via output encoding
* - Path traversal prevention
* - Secure asset validation with SRI
* - Session fingerprinting
* - CSRF protection ready
*
* R-CORP DOCTRINE v3.5 · NAVIGATION HARDENED
*/
// ========== SECURITY HEADERS ==========
declare(strict_types=1);
ob_start();
// Strict Content Security Policy
header("Content-Security-Policy: " .
"default-src 'self'; " .
"script-src 'self' 'nonce-" . bin2hex(random_bytes(16)) . "'; " .
"style-src 'self' 'unsafe-inline'; " .
"img-src 'self' data: https:; " .
"font-src 'self'; " .
"connect-src 'self'; " .
"frame-ancestors 'none'; " .
"base-uri 'self'; " .
"form-action 'self'; " .
"upgrade-insecure-requests;"
);
// Mandatory security headers
header("X-Content-Type-Options: nosniff");
header("X-Frame-Options: DENY");
header("X-XSS-Protection: 1; mode=block");
header("Referrer-Policy: strict-origin-when-cross-origin");
header("Permissions-Policy: geolocation=(), microphone=(), camera=(), payment=()");
header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload");
// Generate CSP nonce
$csp_nonce = bin2hex(random_bytes(16));
// ========== SECURE CONFIGURATION ==========
$config = [
'version' => '3.5.0',
'build' => 'NAVIGATION_COMPLETE',
'environment' => 'production',
'contact' => 'rrralefaso@outlook.com',
'project' => 'DECENSORWEB · PROJECT:OVERTHROW',
'effective_date' => '2024-01-01',
'last_revised' => '2024-11-15'
];
// ========== SECURE OUTPUT ENCODING ==========
function e(string $value, string $context = 'html'): string {
if ($context === 'attr') {
return htmlspecialchars($value, ENT_QUOTES | ENT_HTML5, 'UTF-8');
}
return htmlspecialchars($value, ENT_HTML5, 'UTF-8');
}
// ========== SECURE ASSET VALIDATION ==========
function validateAsset(string $path): ?string {
$allowed_dirs = ['css/', 'js/', 'assets/icons/', 'assets/images/'];
$clean_path = str_replace(['../', '..\\', './', '.\\'], '', $path);
foreach ($allowed_dirs as $dir) {
if (strpos($clean_path, $dir) === 0) {
$full_path = __DIR__ . '/' . $clean_path;
if (file_exists($full_path) && is_readable($full_path)) {
return $clean_path;
}
}
}
return null;
}
// ========== VALIDATE ASSETS ==========
$css_roadmap = validateAsset('css/roadmap.css');
$css_nav = validateAsset('css/navigate.css');
$js_nav = validateAsset('js/navigate.js');
// ========== UPDATED NAVIGATION STRUCTURE ==========
$nav_items = [
'index' => [
'title' => 'MAIN TERMINAL',
'file' => 'index.html',
'icon' => '⌂',
'description' => 'Primary access point · Project:Overthrow command interface · System entry',
'status' => 'ACTIVE',
'color' => '#ff5555',
'doctrine' => 'R-CORP · GATEWAY'
],
'roadmap' => [
'title' => 'PROJECT:OVERTHROW',
'file' => 'roadmap.html',
'icon' => '⚔️',
'description' => 'Strategic timeline · Phase operations · Tactical deployment · Resistance roadmap',
'status' => 'ACTIVE',
'color' => '#ff7777',
'doctrine' => 'OPERATION · ACTIVE'
],
'about' => [
'title' => 'DECENSORWEB',
'file' => 'about.php',
'icon' => '⛧',
'description' => 'Anti-censorship manifesto · R-CORP accountability doctrine · Digital sovereignty',
'status' => 'ACTIVE',
'color' => '#ff8888',
'doctrine' => 'MANIFESTO · ACTIVE'
],
'privacy' => [
'title' => 'PRIVACY & TERMS',
'file' => 'privacy.php',
'icon' => '🔐',
'description' => 'Data sovereignty protocol · Zero logging · Non-compliance · R-CORP Public License',
'status' => 'ACTIVE',
'color' => '#55aaff',
'doctrine' => 'SOVEREIGNTY · ENFORCED'
],
'contact' => [
'title' => 'SECURE CONTACT',
'file' => 'contact.php',
'icon' => '✉️',
'description' => 'Encrypted communications · PGP preferred · GitHub: rr-ralefaso · Instagram: @unusualralph',
'status' => 'ACTIVE',
'color' => '#aa55ff',
'doctrine' => 'ENCRYPTED · SECURE'
]
];
// ========== SYSTEM STATUS ==========
$system_status = [
'state' => 'OPERATIONAL',
'security' => 'HARDENED',
'doctrine' => 'v3.5',
'timestamp' => date('Y-m-d H:i:s'),
'nodes' => count($nav_items),
'protocol' => 'CSP · SRI · HSTS'
];
// ========== QUICK ACCESS ==========
$quick_access = [
'github' => 'https://github.com/rr-ralefaso',
'sponsor' => 'https://github.com/sponsors/RR-Ralefaso',
'instagram' => 'https://instagram.com/unusualralph',
'email' => 'mailto:rrralefaso@outlook.com'
];
// Generate secure fingerprint
$fingerprint = hash_hmac('sha256', $_SERVER['HTTP_USER_AGENT'] ?? '', bin2hex(random_bytes(32)));
$short_fingerprint = substr($fingerprint, 0, 8);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes">
<!-- SECURITY META -->
<meta http-equiv="Content-Security-Policy" content="<?php echo e("default-src 'self'; script-src 'self' 'nonce-$csp_nonce'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests;", 'attr'); ?>">
<meta name="referrer" content="strict-origin-when-cross-origin">
<title>NAVIGATE · DECENSORWEB · PROJECT:OVERTHROW · R-CORP</title>
<!-- CSS · VALIDATED PATHS · SRI PROTECTED -->
<?php if ($css_roadmap): ?>
<link rel="stylesheet" href="<?php echo e($css_roadmap); ?>"
integrity="sha384-<?php echo e(base64_encode(hash_file('sha384', __DIR__ . '/' . $css_roadmap, true))); ?>"
crossorigin="anonymous">
<?php endif; ?>
<?php if ($css_nav): ?>
<link rel="stylesheet" href="<?php echo e($css_nav); ?>"
integrity="sha384-<?php echo e(base64_encode(hash_file('sha384', __DIR__ . '/' . $css_nav, true))); ?>"
crossorigin="anonymous">
<?php endif; ?>
<!-- FALLBACK FAVICON · DATA URI ONLY -->
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' fill='%23000000'/><text x='20' y='70' font-size='70' fill='%23ff0000'>⛧</text></svg>">
</head>
<body>
<!--
================================================
DECENSORWEB · CENTRAL NAVIGATION HUB
R-CORP ACCOUNTABILITY DOCTRINE v3.5
COMPLETE SYSTEM NAVIGATION · 5 ACTIVE NODES
SECURE BUILD: <?php echo e($config['build']); ?> · <?php echo e(date('Y-m-d')); ?>
SYSTEM STATE: OPERATIONAL · SECURITY HARDENED
CONTACT: <?php echo e($config['contact']); ?>
================================================
-->
<div class="nav-container">
<!-- MAP CORNERS · TACTICAL AESTHETIC -->
<div class="map-corner top-left"></div>
<div class="map-corner top-right"></div>
<div class="map-corner bottom-left"></div>
<div class="map-corner bottom-right"></div>
<!-- ========== HEADER ========== -->
<div class="nav-header">
<div class="nav-insignia">
<span class="insignia-mark">⛧</span>
<h1 class="nav-title">NAVIGATION HUB</h1>
<span class="insignia-mark">⛧</span>
</div>
<div class="nav-subheader">
<span class="project-tag"><?php echo e($config['project']); ?></span>
<span class="status-badge">SYSTEM: <?php echo e($system_status['state']); ?></span>
<span class="security-badge">SECURITY: <?php echo e($system_status['security']); ?></span>
<span class="nodes-badge">NODES: <?php echo e((string)$system_status['nodes']); ?></span>
</div>
</div>
<!-- ========== SYSTEM OVERVIEW ========== -->
<div class="system-overview">
<div class="overview-grid">
<div class="overview-item">
<span class="overview-icon">🔐</span>
<span class="overview-label">PROTOCOL</span>
<span class="overview-value"><?php echo e($system_status['protocol']); ?></span>
</div>
<div class="overview-item">
<span class="overview-icon">📡</span>
<span class="overview-label">DOCTRINE</span>
<span class="overview-value"><?php echo e($system_status['doctrine']); ?></span>
</div>
<div class="overview-item">
<span class="overview-icon">⏱️</span>
<span class="overview-label">TIMESTAMP</span>
<span class="overview-value"><?php echo e($system_status['timestamp']); ?></span>
</div>
<div class="overview-item">
<span class="overview-icon">🖧</span>
<span class="overview-label">FINGERPRINT</span>
<span class="overview-value fingerprint">[<?php echo e($short_fingerprint); ?>]</span>
</div>
</div>
</div>
<!-- ========== NAVIGATION GRID ========== -->
<h2 class="section-heading">⚡ ACTIVE SYSTEM NODES ⚡</h2>
<div class="nav-grid">
<?php foreach ($nav_items as $key => $item): ?>
<div class="nav-card" data-nav="<?php echo e($key); ?>">
<div class="nav-card-header" style="border-left-color: <?php echo e($item['color']); ?>;">
<span class="nav-icon"><?php echo e($item['icon']); ?></span>
<h2 class="nav-card-title"><?php echo e($item['title']); ?></h2>
<span class="nav-status"><?php echo e($item['status']); ?></span>
</div>
<div class="nav-card-body">
<p class="nav-description"><?php echo e($item['description']); ?></p>
<div class="nav-file-info">
<span class="file-label">TARGET:</span>
<span class="file-path"><?php echo e($item['file']); ?></span>
<span class="file-doctrine"><?php echo e($item['doctrine']); ?></span>
</div>
<div class="nav-actions">
<a href="<?php echo e($item['file']); ?>"
class="nav-button"
rel="noopener noreferrer"
title="Access <?php echo e($item['title']); ?>">
⚡ ACCESS TERMINAL
</a>
</div>
</div>
<div class="nav-card-footer">
<span class="doctrine-tag">R-CORP · ACCOUNTABLE</span>
</div>
</div>
<?php endforeach; ?>
</div>
<!-- ========== QUICK ACCESS PANEL ========== -->
<div class="quick-access-panel">
<div class="quick-access-header">
<span class="quick-icon">⚡</span>
<h3 class="quick-title">QUICK ACCESS · EXTERNAL CHANNELS</h3>
<span class="quick-icon">⚡</span>
</div>
<div class="quick-access-grid">
<div class="quick-access-item">
<span class="quick-channel-icon">⌨️</span>
<span class="quick-channel-label">GITHUB:</span>
<a href="<?php echo e($quick_access['github']); ?>"
target="_blank"
rel="noopener noreferrer nofollow"
class="quick-channel-link">
rr-ralefaso
</a>
</div>
<div class="quick-access-item">
<span class="quick-channel-icon">⚡</span>
<span class="quick-channel-label">SPONSOR:</span>
<a href="<?php echo e($quick_access['sponsor']); ?>"
target="_blank"
rel="noopener noreferrer nofollow"
class="quick-channel-link">
GitHub Sponsors
</a>
</div>
<div class="quick-access-item">
<span class="quick-channel-icon">📷</span>
<span class="quick-channel-label">INSTAGRAM:</span>
<a href="<?php echo e($quick_access['instagram']); ?>"
target="_blank"
rel="noopener noreferrer nofollow"
class="quick-channel-link">
@unusualralph
</a>
</div>
<div class="quick-access-item">
<span class="quick-channel-icon">✉️</span>
<span class="quick-channel-label">EMAIL:</span>
<a href="<?php echo e($quick_access['email']); ?>"
rel="noopener noreferrer nofollow"
class="quick-channel-link">
<?php echo e($config['contact']); ?>
</a>
</div>
</div>
<div class="quick-access-footer">
<span class="quick-doctrine">PGP ENCRYPTED · SECURE CHANNELS</span>
</div>
</div>
<!-- ========== STATUS PANEL ========== -->
<div class="status-panel">
<div class="status-panel-header">
<span class="panel-icon">🔐</span>
<h3 class="panel-title">SECURITY CLEARANCE & SYSTEM STATUS</h3>
<span class="panel-icon">🔐</span>
</div>
<div class="status-grid">
<div class="status-item">
<span class="status-label">SECURITY PROTOCOL</span>
<span class="status-value">CSP · SRI · HSTS · XSS PROTECTION</span>
</div>
<div class="status-item">
<span class="status-label">SESSION FINGERPRINT</span>
<span class="status-value fingerprint">[<?php echo e($short_fingerprint); ?>]</span>
</div>
<div class="status-item">
<span class="status-label">DOCTRINE VERSION</span>
<span class="status-value"><?php echo e($system_status['doctrine']); ?></span>
</div>
<div class="status-item">
<span class="status-label">BUILD TIMESTAMP</span>
<span class="status-value"><?php echo e($system_status['timestamp']); ?></span>
</div>
<div class="status-item">
<span class="status-label">ACTIVE NODES</span>
<span class="status-value"><?php echo e((string)$system_status['nodes']); ?> · ALL OPERATIONAL</span>
</div>
<div class="status-item">
<span class="status-label">CONTACT CHANNEL</span>
<span class="status-value contact-hash">[<?php echo e(substr(hash('sha256', $config['contact']), 0, 8)); ?>]</span>
</div>
<div class="status-item">
<span class="status-label">NODE STATUS</span>
<span class="status-value">ACTIVE · HARDENED · SOVEREIGN</span>
</div>
<div class="status-item">
<span class="status-label">ENCRYPTION</span>
<span class="status-value">TLS 1.3 · PGP READY</span>
</div>
</div>
<div class="status-footer">
<span class="doctrine-declaration">
⚔️ R-CORP ASSUMES FULL ACCOUNTABILITY FOR ALL ACCESS POINTS · <?php echo e((string)$system_status['nodes']); ?> ACTIVE NODES ⚔️
</span>
</div>
</div>
<!-- ========== NODE DIRECTORY ========== -->
<div class="directory-panel">
<h3 class="directory-title">📋 COMPLETE NODE DIRECTORY</h3>
<div class="directory-grid">
<?php foreach ($nav_items as $item): ?>
<div class="directory-item">
<span class="directory-icon"><?php echo e($item['icon']); ?></span>
<span class="directory-name"><?php echo e($item['title']); ?></span>
<span class="directory-file"><?php echo e($item['file']); ?></span>
<span class="directory-status"><?php echo e($item['status']); ?></span>
</div>
<?php endforeach; ?>
</div>
</div>
<!-- ========== CONTACT & SUPPORT ========== -->
<div class="support-panel">
<div class="support-links">
<div class="support-item">
<span class="support-icon">✉️</span>
<span class="support-label">SECURE CONTACT:</span>
<a href="mailto:<?php echo e($config['contact']); ?>"
class="support-contact"
rel="noopener noreferrer nofollow">
<?php echo e($config['contact']); ?>
</a>
<span class="support-badge">PGP PREFERRED</span>
</div>
<div class="support-item">
<span class="support-icon">⚡</span>
<span class="support-label">SPONSOR:</span>
<a href="https://github.com/sponsors/RR-Ralefaso"
target="_blank"
rel="noopener noreferrer nofollow"
class="support-link">
GITHUB SPONSORS
</a>
</div>
<div class="support-item">
<span class="support-icon">📜</span>
<span class="support-label">LICENSE:</span>
<span class="support-text">R-CORP PUBLIC LICENSE (RPL)</span>
</div>
<div class="support-item">
<span class="support-icon">📷</span>
<span class="support-label">INSTAGRAM:</span>
<a href="https://instagram.com/unusualralph"
target="_blank"
rel="noopener noreferrer nofollow"
class="support-link">
@unusualralph
</a>
</div>
</div>
</div>
<!-- ========== ACCOUNTABILITY BANNER ========== -->
<div class="accountability-banner">
<div class="banner-content">
<span class="banner-icon">⛧</span>
<span class="banner-text">
R-CORP · PARENT COMPANY · FULL ACCOUNTABILITY FOR ALL <?php echo e((string)$system_status['nodes']); ?> SYSTEM NODES
</span>
<span class="banner-icon">⛧</span>
</div>
</div>
<!-- ========== FOOTER ========== -->
<div class="nav-footer">
<div class="footer-doctrine">
<span class="doctrine-short">
<strong>ACCOUNTABILITY:</strong> R-CORP · PARENT COMPANY · FULL RESPONSIBILITY · <?php echo e((string)$system_status['nodes']); ?> ACTIVE NODES
</span>
</div>
<div class="footer-coordinates">
<span class="coordinate">DECENSOR · SECTOR 7</span>
<span class="nav-indicator">[NAVIGATION HUB · v<?php echo e($config['version']); ?>]</span>
<span class="version-tag"><?php echo e($config['build']); ?></span>
<span class="node-count"><?php echo e((string)$system_status['nodes']); ?>/<?php echo e((string)$system_status['nodes']); ?> NODES ONLINE</span>
<span class="fingerprint">[<?php echo e($short_fingerprint); ?>]</span>
</div>
</div>
<!-- SECURE BUILD TIMESTAMP (COMMENT ONLY) -->
<!-- BUILD: <?php echo e(date('Y-m-d H:i:s')); ?> · NONCE: <?php echo e(substr($csp_nonce, 0, 8)); ?> · NODES: <?php echo e((string)$system_status['nodes']); ?>/5 · R-CORP AUDIT PASSED · NAVIGATION COMPLETE -->
</div>
<!-- JAVASCRIPT · EXTERNAL · SRI PROTECTED · NONCE ENFORCED -->
<?php if ($js_nav): ?>
<script src="<?php echo e($js_nav); ?>"
nonce="<?php echo e($csp_nonce); ?>"
integrity="sha384-<?php echo e(base64_encode(hash_file('sha384', __DIR__ . '/' . $js_nav, true))); ?>"
crossorigin="anonymous"
defer></script>
<?php endif; ?>
</body>
</html>
<?php ob_end_flush(); ?>