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

Unable to obtain mac address without network connection.Os.networkInterfaces will not return the network card information when there is no network #34

Open
HackerWand opened this issue Mar 9, 2023 · 0 comments

Comments

@HackerWand
Copy link

// address.mac
interfaceName = interfaceName || getInterfaceName();
// getInterfaceName
var item = address.interface('IPv4', interfaceName);
var interfaces = os.networkInterfaces();

When there is no network, the network card information will not be returned

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

1 participant