-
Notifications
You must be signed in to change notification settings - Fork 49
/
index.html
289 lines (263 loc) · 9.14 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reversing Bits</title>
<style>
/* Light mode colors */
:root {
--bg-color: #ffffff;
--text-color: #333333;
--nav-bg: #f5f5f5;
}
/* Dark mode colors */
[data-theme="dark"] {
--bg-color: #1a1a1a;
--text-color: #ffffff;
--nav-bg: #2d2d2d;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background-color: var(--bg-color);
color: var(--text-color);
transition: background-color 0.3s, color 0.3s;
}
.container {
max-width: 800px;
margin: 0 auto;
position: relative;
padding-top: 60px;
}
.nav-buttons {
position: fixed;
top: 20px;
width: 100%;
max-width: 800px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: var(--nav-bg);
padding: 10px;
border-radius: 8px;
z-index: 1000;
}
.nav-button {
padding: 8px 16px;
border: none;
border-radius: 4px;
background-color: #007bff;
color: white;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
}
.nav-button:hover {
background-color: #0056b3;
}
.theme-toggle {
background: none;
border: none;
cursor: pointer;
padding: 8px;
color: var(--text-color);
font-size: 1.2rem;
}
#content {
margin-top: 20px;
}
.page-title {
display: inline-block;
margin: 0 10px;
font-size: 0.9em;
color: var(--text-color);
}
#content a {
color: #007bff;
text-decoration: none;
}
#content a:hover {
text-decoration: underline;
}
pre {
background-color: var(--nav-bg);
padding: 15px;
border-radius: 5px;
overflow-x: auto;
}
code {
font-family: 'Consolas', 'Monaco', monospace;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.0.2/marked.min.js"></script>
</head>
<body>
<div class="container">
<div class="nav-buttons">
<button id="prevBtn" class="nav-button">
← <span id="prevTitle" class="page-title">Previous</span>
</button>
<button id="themeToggle" class="theme-toggle">🌞</button>
<button id="nextBtn" class="nav-button">
<span id="nextTitle" class="page-title">Next</span> →
</button>
</div>
<div id="content"></div>
</div>
<script>
// Tool titles mapping
const toolTitles = {
'README': 'Introduction',
'gcc':'GNU Compiler Collection',
'angr': 'Angr - Binary Analysis Framework',
'bap': 'BAP - Binary Analysis Platform',
'binaryninja': 'Binary Ninja',
'capstone': 'Capstone - Multi-Architecture Disassembly',
'diaphora': 'Diaphora - Binary Diffing',
'dyninst': 'Dyninst - Binary Instrumentation',
'file': 'File Command',
'freedom': 'FrEEdom Binary Analysis',
'frida': 'Frida Dynamic Instrumentation',
'gas': 'GNU Assembler (GAS)',
'gdb': 'GDB Debugger',
'ghidra': 'Ghidra Reverse Engineering',
'hexdump': 'Hexdump Utility',
'hopper': 'Hopper Disassembler',
'idapro': 'IDA Pro',
'intelXed': 'Intel XED',
'nasm': 'NASM Assembler',
'nm': 'NM Symbol Listing',
'objdump': 'Objdump',
'ollydbg': 'OllyDbg Debugger',
'pema': 'PEMA Analysis',
'pin': 'Intel PIN',
'qemu': 'QEMU Emulator',
'radare2': 'Radare2',
'readelf': 'ReadELF',
'retdec': 'RetDec Decompiler',
'rizin': 'Rizin',
'spike': 'SPIKE Fuzzer',
'strings': 'Strings Utility',
'unicorn': 'Unicorn - CPU Emulator',
'valgrind': 'Valgrind',
'windbg': 'WinDbg',
'yara': 'YARA Pattern Matching',
'zynamics': 'Zynamics',
'cutter': 'Cutter - Reverse Engineering Platform',
'binaryanalysistool': 'Binary Analysis Tool (BAT)',
'miasm': 'Miasm - Reverse Engineering Framework',
'triton': 'Triton - Dynamic Binary Analysis Framework',
'peda': 'PEDA - Python Exploit Development Assistance for GDB',
'dotnetILviewer': 'Dotnet-Offline-IL-Viewer', // Updated key
'snowman': 'Snowman Decompiler',
'binaryninjacloud': 'Binary Ninja Cloud'
};
// List of markdown files in order
const pages = [
'README.md',
'src/gcc.md',
'src/angr.md',
'src/bap.md',
'src/binaryninja.md',
'src/capstone.md',
'src/diaphora.md',
'src/dyninst.md',
'src/file.md',
'src/freedom.md',
'src/frida.md',
'src/gas.md',
'src/gdb.md',
'src/ghidra.md',
'src/hexdump.md',
'src/hopper.md',
'src/idapro.md',
'src/intelXed.md',
'src/nasm.md',
'src/nm.md',
'src/objdump.md',
'src/ollydbg.md',
'src/pema.md',
'src/pin.md',
'src/qemu.md',
'src/radare2.md',
'src/readelf.md',
'src/retdec.md',
'src/rizin.md',
'src/spike.md',
'src/strings.md',
'src/unicorn.md',
'src/valgrind.md',
'src/windbg.md',
'src/yara.md',
'src/zynamics.md',
'src/cutter.md',
'src/binaryanalysistool.md',
'src/miasm.md',
'src/triton.md',
'src/peda.md',
'src/dotnetILviewer.md',
'src/snowman.md',
'src/binaryninjacloud.md'
];
// Rest of the JavaScript remains the same
let currentPageIndex = 0;
// Theme toggling
const themeToggle = document.getElementById('themeToggle');
let isDarkMode = false;
themeToggle.addEventListener('click', () => {
isDarkMode = !isDarkMode;
document.body.setAttribute('data-theme', isDarkMode ? 'dark' : 'light');
themeToggle.textContent = isDarkMode ? '🌜' : '🌞';
});
// Get the display title for a page
function getPageTitle(filename) {
const baseName = filename.replace('.md', '').replace('src/', '');
return toolTitles[baseName] || baseName;
}
// Navigation functions
function updateNavButtons() {
const prevBtn = document.getElementById('prevBtn');
const nextBtn = document.getElementById('nextBtn');
const prevTitle = document.getElementById('prevTitle');
const nextTitle = document.getElementById('nextTitle');
prevBtn.style.visibility = currentPageIndex > 0 ? 'visible' : 'hidden';
nextBtn.style.visibility = currentPageIndex < pages.length - 1 ? 'visible' : 'hidden';
if (currentPageIndex > 0) {
prevTitle.textContent = getPageTitle(pages[currentPageIndex - 1]);
}
if (currentPageIndex < pages.length - 1) {
nextTitle.textContent = getPageTitle(pages[currentPageIndex + 1]);
}
}
async function loadPage(index) {
try {
const response = await fetch(pages[index]);
const text = await response.text();
document.getElementById('content').innerHTML = marked.parse(text);
currentPageIndex = index;
updateNavButtons();
window.scrollTo(0, 0);
} catch (error) {
console.error('Error loading page:', error);
document.getElementById('content').innerHTML = '<p>Error loading content. Please try again.</p>';
}
}
document.getElementById('prevBtn').addEventListener('click', () => {
if (currentPageIndex > 0) {
loadPage(currentPageIndex - 1);
}
});
document.getElementById('nextBtn').addEventListener('click', () => {
if (currentPageIndex < pages.length - 1) {
loadPage(currentPageIndex + 1);
}
});
// Initial load
loadPage(0);
</script>
</body>
</html>