Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion Failure #93

Open
CookieHosting opened this issue Sep 21, 2024 · 1 comment
Open

Assertion Failure #93

CookieHosting opened this issue Sep 21, 2024 · 1 comment

Comments

@CookieHosting
Copy link

What version of pkg are you using?

5.15.0

What version of Node.js are you using?

v20.17.0

What operating system are you using?

Windows 10

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

node18, x86_64 and windos

Describe the Bug

I compiled the code to exe with the command pkg index.js --targets node18-win-x64 --output AntiVm.exe after that when ran on my other device to test it gives this error on the other device but not the one i ade it on

Assertion failed: result_size == sppi_size, file C:\Users\dev\AppData\Local\Temp\pkg.24e0b2b2d51e47b9dba34c30\node\deps\uv\src\win\util.c, line 676

Expected Behavior

I was trying to develop an anti vm i was making and it was supposed to just output the system info but it didnt work on my other device which is a laptop but it worked on my desktop i made it on.

To Reproduce

Once you install the prerequisits then run pkg index.js --targets node18-win-x64 --output AntiVm.exe

packages:
npm i node-fetch@2 [email protected] readline systeminformation

node-fetch: 2.7.0
ps-list: 5.0.1
readline: 1.3.0
systeminformation: 5.23.5

Code:

const fetch = require('node-fetch');
const os = require('os');
const { createHash } = require('crypto');
const readline = require('readline');
const systeminformation = require('systeminformation');
const psList = require('ps-list');

(async () => {
    const ProcessLists = await psList();
    const VmSoftware = [
        "vmwareservice", 
        "vmwaretray", 
        "virtualmachine", 
        "sandboxie", 
        "windowssandbox", 
        "joeboxcontrol", 
        "vmwareuser", 
        "vmware", 
        "virtualbox", 
        "hyperv", 
        "zillya", 
        "zillyaservice", 
        "symantec"
    ];

    for (const process of ProcessLists) {
        if (VmSoftware.includes(process.name.toLowerCase())) {
            console.log(`VM software detected: ${process.name}`);
        }
    }

    const Cpu = await systeminformation.cpu();
    const OS = await systeminformation.osInfo();
    const Bios = await systeminformation.bios();
    const Motherboard = await systeminformation.baseboard();
    const Graphics = await systeminformation.graphics();
    const Network = await systeminformation.networkInterfaces();
    const System = await systeminformation.system();

    console.log('CPU Information:', Cpu);
    console.log('OS Information:', OS);
    console.log('BIOS Information:', Bios);
    console.log('Motherboard Information:', Motherboard);
    console.log('Graphics Information:', Graphics);
    console.log('Network Interfaces:', Network);
    console.log('System Information:', System);

    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout
    });
    
    rl.question('Press Enter to exit...', () => {
        rl.close();
        process.exit(0);
    });
})();
@robertsLando
Copy link
Member

Could you try to see if you can reproduce this with pkg 5.12.1 and 5.13.0 ? I would like to see if this has been broken in one of latest releases or always not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants