node-webkit 使用os模块获取用户MAC值和IP

来源:互联网 发布:desmume模拟器mac版 编辑:程序博客网 时间:2024/05/29 19:00

代码:

var os = require("os");// CPU 的字节序console.log('endianness : ' + os.endianness());// 操作系统名console.log('type : ' + os.type());// 操作系统名console.log('platform : ' + os.platform());// 系统内存总量console.log('total memory : ' + os.totalmem() + " bytes.");// 操作系统空闲内存量console.log('free memory : ' + os.freemem() + " bytes.");//获得网络接口列表console.log(os.networkInterfaces());


阅读全文
0 0