forked from rweijnen/marstek-firmware-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
165 lines (152 loc) · 7.47 KB
/
index.html
File metadata and controls
165 lines (152 loc) · 7.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marstek Firmware Analyzer</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
<!-- Header -->
<div class="row">
<div class="col-12 text-center">
<h1 class="display-4 mb-4">Marstek Firmware Analyzer</h1>
<p class="lead text-muted">Extract certificates and security information from Marstek firmware</p>
<small class="text-muted" id="versionInfo">Loading version...</small>
</div>
</div>
<!-- File Upload Section -->
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">
<h5 class="mb-0">Upload Firmware File</h5>
</div>
<div class="card-body">
<div class="mb-3">
<input type="file" class="form-control" id="firmwareFile" accept=".bin">
<div class="form-text">Select a Marstek firmware .bin file to analyze</div>
</div>
<button type="button" class="btn btn-primary" id="analyzeBtn" disabled>
<span id="analyzeSpinner" class="spinner-border spinner-border-sm d-none" role="status">
<span class="visually-hidden">Loading...</span>
</span>
Analyze Firmware
</button>
</div>
</div>
</div>
</div>
<!-- Progress Section -->
<div class="row justify-content-center mt-4">
<div class="col-md-8">
<div id="progressSection" class="d-none">
<div class="card">
<div class="card-header">
<h6 class="mb-0">Analysis Progress</h6>
</div>
<div class="card-body">
<div class="progress mb-2">
<div id="progressBar" class="progress-bar" role="progressbar" style="width: 0%"></div>
</div>
<div id="progressText" class="text-muted">Ready to start...</div>
</div>
</div>
</div>
</div>
</div>
<!-- Results Section -->
<div class="row justify-content-center mt-4">
<div class="col-md-10">
<div id="resultsSection" class="d-none">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Analysis Results</h5>
<button type="button" class="btn btn-success btn-sm" id="downloadAllBtn">
Download All Certificates
</button>
</div>
<div class="card-body">
<!-- Summary -->
<div id="summarySection" class="mb-4"></div>
<!-- Firmware Information -->
<div id="firmwareSection" class="mb-4"></div>
<!-- AWS Endpoints -->
<div id="awsSection" class="mb-4"></div>
<!-- Certificates -->
<div id="certificatesSection"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Error Section -->
<div class="row justify-content-center mt-4">
<div class="col-md-8">
<div id="errorSection" class="d-none">
<div class="alert alert-danger" role="alert">
<h6>Analysis Failed</h6>
<div id="errorMessage"></div>
</div>
</div>
</div>
</div>
<!-- Disclaimer -->
<div class="row justify-content-center mt-5">
<div class="col-md-10">
<div class="alert alert-warning" role="alert">
<h6 class="alert-heading">⚠️ Important Disclaimer</h6>
<p class="mb-2">
This is an <strong>unofficial, independent security research tool</strong> and is not affiliated with, endorsed by, or officially associated with Marstek or any of its subsidiaries or affiliates.
</p>
<p class="mb-2">
<strong>Use at your own risk.</strong> Neither Marstek, the tool's author, nor any contributors are responsible for any damage, data loss, security breaches, warranty voids, or other consequences that may result from using this tool.
</p>
<p class="mb-0">
This tool is provided for <strong>security research and educational purposes only</strong>. Only analyze firmware files that you own or have explicit permission to analyze. Users are solely responsible for complying with applicable laws and regulations.
</p>
</div>
</div>
</div>
<!-- Footer -->
<footer class="mt-4 py-4 bg-light">
<div class="container text-center">
<p class="text-muted mb-0">
Marstek Firmware Analyzer - All analysis is performed locally in your browser
</p>
</div>
</footer>
</div>
<!-- External Libraries -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/node-forge@1.3.1/dist/forge.min.js"></script>
<!-- Application Scripts -->
<script src="js/firmware-analyzer.js"></script>
<script src="js/crypto-utils.js"></script>
<script src="js/certificate-parser.js"></script>
<script src="js/ui-handler.js"></script>
<script>
// Initialize the application
document.addEventListener('DOMContentLoaded', function() {
initializeApp();
loadVersionInfo();
});
// Load version information from GitHub API
async function loadVersionInfo() {
try {
const response = await fetch('https://api.github.com/repos/rweijnen/marstek-firmware-analyzer/commits/main');
const data = await response.json();
const shortSha = data.sha.substring(0, 7);
const date = new Date(data.commit.author.date).toLocaleDateString();
document.getElementById('versionInfo').textContent = `Version: ${shortSha} (${date})`;
} catch (error) {
console.warn('Could not load version info:', error);
document.getElementById('versionInfo').textContent = 'Version: unknown';
}
}
</script>
</body>
</html>