2025-03-13 19:57:47 +01:00
|
|
|
const { parentPort, workerData } = require('worker_threads');
|
|
|
|
|
2025-03-23 13:15:42 +01:00
|
|
|
const { functionToEval, filePath, data, patterns, extensions, filenames, aimodel, aiprompt, llamaendpoint, yaraMatch } = workerData;
|
2025-03-13 19:57:47 +01:00
|
|
|
|
|
|
|
async function runEval() {
|
|
|
|
try {
|
|
|
|
const result = eval(functionToEval);
|
2025-03-23 13:15:42 +01:00
|
|
|
parentPort.postMessage({ result, yaraMatch });
|
2025-03-13 19:57:47 +01:00
|
|
|
} catch (error) {
|
|
|
|
parentPort.postMessage({ error: error.message });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
runEval();
|