Skip to content

Instantly share code, notes, and snippets.

@twilson90
Created August 11, 2022 19:43
Show Gist options
  • Save twilson90/d503e3810c1bf167b472b27204c6e144 to your computer and use it in GitHub Desktop.
Save twilson90/d503e3810c1bf167b472b27204c6e144 to your computer and use it in GitHub Desktop.
var fs = require("fs-extra");
(async()=>{
var buffers = [];
buffers.push(await fs.readFile("flashplayer_18_sa2.exe"));
var swf = await fs.readFile("wrapper.swf");
buffers.push(swf);
var end = [0x56, 0x34, 0x12, 0xFA];
var sizeTemp = swf.length;
while (sizeTemp>0) {
end.push(sizeTemp % 0x100);
sizeTemp = Math.floor(sizeTemp / 0x100);
}
while (end.length<8) {
end.push(0x00);
}
buffers.push(Buffer.from(end));
var data = Buffer.concat(buffers);
await fs.writeFile("Wasted Youth, Part 1.exe", data);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment