-
Notifications
You must be signed in to change notification settings - Fork 0
/
report_template.html
286 lines (261 loc) · 9.11 KB
/
report_template.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IYD Auto-generated report</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #f5f5f5;
padding: 20px;
margin: 0;
font-size: 11px;
}
.container {
max-width: 700px;
margin: auto;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
padding: 20px;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.download-link {
font-size: 12px;
}
table {
width: 100%;
margin-bottom: 10px;
border-collapse: collapse;
border: 1px solid #ddd;
font-size: 14px;
}
th, td {
padding: 2px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
font-weight: bold;
}
h1, h2 {
text-align: center;
margin-bottom: 20px;
font-size: 20px;
}
img {
max-width: 100px;
display: block;
margin: 0 auto;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="container">
<h1>IYD Auto-generated report</h1>
<div class="download-link">
<a href="#" id="downloadLink">Download Report as Text File</a><br><br>
</div>
<table>
<tr>
<th colspan="2">Image Information</th>
</tr>
<tr>
<td>Image name:</td>
<td>{{ image_name }}</td>
</tr>
<tr>
<td>Imaging Start Time:</td>
<td>{{ start_time }}</td>
</tr>
<tr>
<td>Imaging End Time:</td>
<td>{{ end_time }}</td>
</tr>
<tr>
<td>Image type/format:</td>
<td>{{ image_type }}</td>
</tr>
</table>
<table>
<tr>
<th colspan="2">Case Information</th>
</tr>
<tr>
<td>Case Number:</td>
<td>{{ case_no }}</td>
</tr>
<tr>
<td>Evidence Number:</td>
<td>{{ evd_no }}</td>
</tr>
<tr>
<td>Description:</td>
<td>{{ desc }}</td>
</tr>
<tr>
<td>Examiner:</td>
<td>{{ examiner }}</td>
</tr>
<tr>
<td>Notes:</td>
<td>{{ notes }}</td>
</tr>
</table>
<table>
<tr>
<th colspan="2">Physical Evidentiary Item (Source) Information</th>
</tr>
<tr>
<td colspan="2"><strong>[Drive Geometry (LBM)]</strong></td>
</tr>
<tr>
<td>Sector Size / Physical Block Size:</td>
<td>{{ physical_block_size }}</td>
</tr>
<tr>
<td>Logical Block Size:</td>
<td>{{ logical_block_size }}</td>
</tr>
<tr>
<td>Total Sectors:</td>
<td>{{ total_sectors }}</td>
</tr>
<tr>
<td>Bytes per Sector:</td>
<td>{{ bytes_per_sector }}</td>
</tr>
<tr>
<td><u><strong>Partition Information:<strong></u></td>
<td>{{ partition_information | safe }}</td>
</tr>
<tr>
<td colspan="2"><strong>[Physical Drive Info]</strong></td>
</tr>
<tr>
<td>Drive Model:</td>
<td>{{ drive_model }}</td>
</tr>
<tr>
<td>Drive Serial Number:</td>
<td>{{ drive_serial_number }}</td>
</tr>
<tr>
<td>Partitioning Scheme:</td>
<td>{{ partition_table }}</td>
</tr>
<tr>
<td>Storage Occupied:</td>
<td>{{ source_data_size }} bytes</td>
</tr>
<tr>
<td>Sector Count:</td>
<td>{{ sector_count }}</td>
</tr>
<tr>
<td colspan="2"><strong>[Computed Hashes]</strong></td>
</tr>
<tr>
<td>Drive MD5 Hash (Computed Just Before Imaging):</td>
<td>{{ md5_hash }}</td>
</tr>
<tr>
<td>Drive SHA-1 Hash (Computed Just Before Imaging):</td>
<td>{{ sha1_hash }}</td>
</tr>
</table>
<table>
<tr>
<th colspan="2">Image Information</th>
</tr>
<tr>
<td>Aquisition Started:</td>
<td>{{ aq_started }}</td>
</tr>
<tr>
<td>Aquisition Ended:</td>
<td>{{ aq_ended }}</td>
</tr>
</table>
<table>
<tr>
<th colspan="2">Image Verification Results</th>
</tr>
<tr>
<td>Verification Started:</td>
<td>{{ ve_started }}</td>
</tr>
<tr>
<td>Verification Ended:</td>
<td>{{ ve_ended }}</td>
</tr>
<tr>
<td>MD5 Hash:</td>
<td>{{ img_md5_hash }}</td>
</tr>
<tr>
<td>SHA1 Hash:</td>
<td>{{ img_sha1_hash }}</td>
</tr>
</table>
</div>
<script>
function downloadReport() {
var reportContent = generateReportContent();
var blob = new Blob([reportContent], { type: 'text/plain' });
var downloadLink = document.getElementById('downloadLink');
downloadLink.href = URL.createObjectURL(blob);
downloadLink.download = 'iyd_report.txt'; // Filename to download
// Uncomment the next line to automatically start download
downloadLink.click();
}
function generateReportContent() {
var content = '';
content += 'IYD Auto-generated Report:\n\n';
content += 'Image Information:\n';
content += 'Image name: ' + '{{ image_name }}' + '\n';
content += 'Imaging Start Time: ' + '{{ start_time }}' + '\n';
content += 'Imaging End Time: ' + '{{ end_time }}' + '\n';
content += 'Image type/format: ' + '{{ image_type}}' + '\n\n';
content += 'Case Information:\n';
content += 'Case Number: ' + '{{ case_no }}' + '\n';
content += 'Evidence Number: ' + '{{ evd_no }}' + '\n';
content += 'Description: ' + '{{ desc }}' + '\n';
content += 'Examiner: ' + '{{ examiner }}' + '\n';
content += 'Notes: ' + '{{ notes }}' + '\n\n';
content += 'Physical Evidentiary Item (Source) Information:\n';
content += '[Drive Geometry]\n';
content += 'Sector Size / Physical Block Size: ' + '{{ physical_block_size }}' + '\n';
content += 'Logical Block Size: ' + '{{ logical_block_size }}' + '\n';
content += 'Total Sectors: ' + '{{ total_sectors }}' + '\n';
content += 'Bytes per Sector: ' + '{{ bytes_per_sector }}' + '\n';
content += 'Partition Information: ' + '{{ partition_information }}' + '\n\n';
content += '[Physical Drive Info]\n';
content += 'Drive Model: ' + '{{ drive_model }}' + '\n';
content += 'Drive Serial Number: ' + '{{ drive_serial_number }}' + '\n';
content += 'Partitioning Scheme: ' + '{{ partition_table }}' + '\n';
content += 'Source Data Size: ' + '{{ source_data_size }}' + '\n';
content += 'Sector Count: ' + '{{ sector_count }}' + '\n\n';
content += '[Computed Hashes]\n';
content += 'Drive MD5 Hash (Computed Just Before Imaging): ' + '{{ md5_hash }}' + '\n';
content += 'Drive SHA1 Hash (Computed Just Before Imaging): '+ '{{ sha1_hash }}' + '\n';
content += 'Image Information:\n';
content += 'Aquisition Started: ' + '{{ aq_started }}' + '\n';
content += 'Aquisition Ended: ' + '{{ aq_ended }}' + '\n\n';
content += 'Image Verification Results:\n';
content += 'Verification Started: ' + '{{ ve_started }}' + '\n';
content += 'Verification Ended: ' + '{{ ve_ended }}' + '\n';
content += 'MD5 hash: ' + '{{ img_md5_hash }}' + '\n';
content += 'SHA1 hash: ' + '{{ img_sha1_hash }}' + '\n\n';
return content;
}
window.onload = function() {
document.getElementById('downloadLink').addEventListener('click', downloadReport);
};
</script>
</body>
</html>