-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
303 lines (274 loc) · 11.6 KB
/
404.html
File metadata and controls
303 lines (274 loc) · 11.6 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
---
permalink: /404.html
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Not Found — The Sleuth Kit Wiki</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/style.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #1c2130;">
<div class="container">
<a class="navbar-brand fw-semibold" href="/">
<span style="color: #3b6fc4;">▲</span> The Sleuth Kit Wiki
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMain">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMain">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
<li class="nav-item"><a class="nav-link" href="/The-Sleuth-Kit/">The Sleuth Kit</a></li>
<li class="nav-item"><a class="nav-link" href="/Autopsy/">Autopsy</a></li>
<li class="nav-item">
<a class="nav-link" href="https://sleuthkit.org" target="_blank" rel="noopener">sleuthkit.org ↗</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container py-5">
<div class="row justify-content-center">
<div class="col-lg-7">
<!-- State: checking for redirect (hidden after JS runs) -->
<div id="state-checking">
<p class="text-muted small">Checking for redirect…</p>
</div>
<!-- State: redirect found -->
<div id="state-redirect" style="display:none;">
<div class="wiki-note mb-4">
<strong>Redirecting…</strong>
Found a matching page at <strong><a id="redirect-url" href="#"></a></strong>.
<span id="countdown"></span>
</div>
<p class="text-muted small">
Old URL detected: <code id="old-url-display"></code>
</p>
</div>
<!-- State: not found -->
<div id="state-not-found" style="display:none;">
<h1 class="page-title mb-4">Page Not Found</h1>
<p class="lead">
The page you requested doesn't exist on this wiki.
</p>
<div id="suggested-title-block" style="display:none;" class="wiki-note mb-4">
Looking for <strong><em><span id="suggested-title"></span></em></strong>?
That page wasn't found in this archive. It may have been removed or never migrated.
</div>
<p>A few things to try:</p>
<ul>
<li><a href="/">Browse all pages</a> — the full page index, organized by category</li>
<li>Check the current docs at
<a href="https://sleuthkit.org/sleuthkit/docs/" target="_blank" rel="noopener">sleuthkit.org/sleuthkit/docs/</a>
or
<a href="https://sleuthkit.org/autopsy/docs/" target="_blank" rel="noopener">sleuthkit.org/autopsy/docs/</a>
</li>
<li>Search on <a href="https://github.com/sleuthkit" target="_blank" rel="noopener">GitHub</a></li>
</ul>
<div class="mt-5 text-center">
<a href="/" class="btn btn-primary px-4">Go to Home Page</a>
</div>
</div>
</div>
</div>
</div>
<footer class="mt-5 py-4" style="background-color:#1c2130;color:#aab4c8;">
<div class="container">
<div class="row">
<div class="col-md-6">
<p class="mb-1 small">
<strong style="color:#fff;">The Sleuth Kit Wiki</strong> —
Archived documentation for The Sleuth Kit and Autopsy.
</p>
<p class="mb-0 small">
For current docs visit <a href="https://sleuthkit.org" style="color:#3b6fc4;">sleuthkit.org</a>.
</p>
</div>
<div class="col-md-6 text-md-end mt-3 mt-md-0">
<p class="mb-0 small">Content originally from wiki.sleuthkit.org</p>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script>
(function () {
'use strict';
// ---------------------------------------------------------------------------
// Redirect map: old wiki title (lowercase) → canonical Jekyll slug
// Covers all #REDIRECT pages from the original export.
// ---------------------------------------------------------------------------
var REDIRECT_MAP = {
// --- #REDIRECT pages from the original wiki ---
'autopsy 3': 'Autopsy',
'autopsy 3 data flow': 'Autopsy-3-Nodes-and-Data-Flow',
'autopsy forensic browser': 'Autopsy',
'books on tsk': 'Books-and-Courses',
'books and courses on tsk': 'Books-and-Courses',
'data units': 'Data-unit',
'dcalc': 'blkcalc',
'dcat': 'blkcat',
"developer's guide": 'TSK-Developers-Guide',
'dls': 'blkls',
'documents on using tsk': 'Books-and-Courses',
'dstat': 'blkstat',
'ext2/3': 'ExtX',
'fragments': 'Fragment',
"library user's guide": 'TSK-Library-Users-Guide',
'library users guide': 'TSK-Library-Users-Guide',
'mac-robber output': 'Mactime-output',
'metadata address': 'Metadata-Address',
'metadata addresses': 'Metadata-Address',
'project communication': 'Project-Communication',
'sectors': 'Sector',
'tsk': 'The-Sleuth-Kit',
'timeline': 'Timelines',
'tools using tsk': 'Tools-Using-TSK-or-Autopsy',
// --- Renamed tool pages (old capitalised slug → new lowercase slug) ---
// Handles ?title=Blkcalc, /wiki/Blkcalc, etc. where titleToSlug fallback
// would produce the wrong capitalised URL.
'blkcalc': 'blkcalc',
'blkcat': 'blkcat',
'blkls': 'blkls',
'blkstat': 'blkstat',
'ffind': 'ffind',
'fls': 'fls',
'fsstat': 'fsstat',
'hfind': 'hfind',
'icat': 'icat',
'ifind': 'ifind',
'ils': 'ils',
'istat': 'istat',
'jcat': 'jcat',
'jls': 'jls',
'mac-robber': 'mac-robber',
'mactime': 'mactime',
'sigfind': 'sigfind',
'sorter': 'sorter',
// --- Tools with underscores (old ?title=Disk_stat → "disk stat" after _ replace) ---
'disk sreset': 'disk_sreset',
'disk stat': 'disk_stat',
'img cat': 'img_cat',
'img stat': 'img_stat',
'tsk comparedir': 'tsk_comparedir',
'tsk gettimes': 'tsk_gettimes',
'tsk loaddb': 'tsk_loaddb',
'tsk recover': 'tsk_recover'
};
// ---------------------------------------------------------------------------
// Replicate the Python title_to_slug() logic in JavaScript.
//
// def title_to_slug(title):
// slug = title.strip()
// slug = re.sub(r'[:/]', '-', slug)
// slug = re.sub(r'\s+', '-', slug)
// slug = re.sub(r'[^A-Za-z0-9_\-]', '', slug)
// slug = re.sub(r'-+', '-', slug).strip('-')
// return slug
// ---------------------------------------------------------------------------
function titleToSlug(title) {
var slug = title.trim();
slug = slug.replace(/[:/]/g, '-');
slug = slug.replace(/\s+/g, '-');
slug = slug.replace(/[^A-Za-z0-9_\-]/g, '');
slug = slug.replace(/-+/g, '-').replace(/^-+|-+$/g, '');
return slug;
}
// ---------------------------------------------------------------------------
// Extract a MediaWiki page title from the current URL.
//
// Patterns handled:
// /index.php?title=Page_Name[&action=...]
// /index.php/Page_Name
// /wiki/Page_Name
// ?title=Page_Name (any path)
// ---------------------------------------------------------------------------
function extractWikiTitle() {
var search = window.location.search; // e.g. "?title=The_Sleuth_Kit&action=edit"
var pathname = window.location.pathname; // e.g. "/wiki/The_Sleuth_Kit"
// 1. Query-string: ?title=...
if (search) {
var params = new URLSearchParams(search);
var t = params.get('title');
if (t) {
return decodeURIComponent(t).replace(/_/g, ' ');
}
}
// 2. Path-based: /wiki/Page_Name or /index.php/Page_Name
var pathMatch = pathname.match(/^\/(?:wiki|index\.php)\/(.+)$/i);
if (pathMatch) {
return decodeURIComponent(pathMatch[1]).replace(/_/g, ' ');
}
return null;
}
// ---------------------------------------------------------------------------
// Resolve a title to a Jekyll URL:
// 1. Check redirect map (case-insensitive)
// 2. Fall back to direct slug conversion
// Returns an absolute path like "/The-Sleuth-Kit/"
// ---------------------------------------------------------------------------
function resolveUrl(title) {
var lower = title.toLowerCase();
if (REDIRECT_MAP.hasOwnProperty(lower)) {
return '/' + REDIRECT_MAP[lower] + '/';
}
var slug = titleToSlug(title);
if (slug) {
return '/' + slug + '/';
}
return null;
}
// ---------------------------------------------------------------------------
// Show a state, hide the others
// ---------------------------------------------------------------------------
function showState(id) {
['state-checking', 'state-redirect', 'state-not-found'].forEach(function (s) {
document.getElementById(s).style.display = (s === id) ? '' : 'none';
});
}
// ---------------------------------------------------------------------------
// Main
// ---------------------------------------------------------------------------
var title = extractWikiTitle();
if (title) {
var targetUrl = resolveUrl(title);
if (targetUrl) {
// Show redirect state with countdown
showState('state-redirect');
var oldDisplay = document.getElementById('old-url-display');
var redirectLink = document.getElementById('redirect-url');
var countdownEl = document.getElementById('countdown');
oldDisplay.textContent = window.location.href;
redirectLink.textContent = targetUrl;
redirectLink.href = targetUrl;
var secs = 3;
function tick() {
countdownEl.textContent = ' Redirecting in ' + secs + '\u2026';
if (secs === 0) {
window.location.replace(targetUrl);
} else {
secs--;
setTimeout(tick, 1000);
}
}
tick();
return; // done
}
}
// No redirect found — show 404 message
showState('state-not-found');
if (title) {
document.getElementById('suggested-title').textContent = title;
document.getElementById('suggested-title-block').style.display = '';
}
})();
</script>
</body>
</html>