systeminformation 5.33.5 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +873 -958
- package/dist/audio.d.ts +1 -0
- package/dist/audio.js +18 -0
- package/dist/baseboard.d.ts +1 -0
- package/dist/baseboard.js +17 -0
- package/dist/battery.d.ts +1 -0
- package/dist/battery.js +19 -0
- package/dist/bios.d.ts +1 -0
- package/dist/bios.js +17 -0
- package/dist/block-devices.d.ts +1 -0
- package/dist/block-devices.js +17 -0
- package/dist/bluetooth.d.ts +1 -0
- package/dist/bluetooth.js +17 -0
- package/dist/bsd/battery.d.ts +2 -0
- package/dist/bsd/battery.js +27 -0
- package/dist/bsd/cpu-cache.d.ts +1 -0
- package/dist/bsd/cpu-cache.js +37 -0
- package/dist/bsd/cpu-flags.d.ts +1 -0
- package/dist/bsd/cpu-flags.js +28 -0
- package/dist/bsd/cpu-temperature.d.ts +1 -0
- package/dist/bsd/cpu-temperature.js +29 -0
- package/dist/bsd/cpu.d.ts +1 -0
- package/dist/bsd/cpu.js +98 -0
- package/dist/bsd/index.d.ts +38 -0
- package/dist/bsd/index.js +85 -0
- package/dist/bsd/mem.d.ts +1 -0
- package/dist/bsd/mem.js +37 -0
- package/dist/bsd/network-stats.d.ts +2 -0
- package/dist/bsd/network-stats.js +92 -0
- package/dist/bsd/os-info.d.ts +24 -0
- package/dist/bsd/os-info.js +47 -0
- package/dist/bsd/uuid.d.ts +2 -0
- package/dist/bsd/uuid.js +30 -0
- package/dist/camera.d.ts +1 -0
- package/dist/camera.js +17 -0
- package/dist/chassis.d.ts +1 -0
- package/dist/chassis.js +17 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +107 -0
- package/dist/common/acceleration.d.ts +8 -0
- package/dist/common/acceleration.js +86 -0
- package/dist/common/codepage.d.ts +1 -0
- package/dist/common/codepage.js +43 -0
- package/dist/common/const.d.ts +25 -0
- package/dist/common/const.js +26 -0
- package/dist/common/cpu.d.ts +2 -0
- package/dist/common/cpu.js +12 -0
- package/dist/common/darwin.d.ts +6 -0
- package/dist/common/darwin.js +266 -0
- package/dist/common/datetime.d.ts +9 -0
- package/dist/common/datetime.js +161 -0
- package/dist/common/defaults.d.ts +25 -0
- package/dist/common/defaults.js +304 -0
- package/dist/common/exec.d.ts +10 -0
- package/dist/common/exec.js +69 -0
- package/dist/common/files.d.ts +2 -0
- package/dist/common/files.js +39 -0
- package/dist/common/filesys.d.ts +11 -0
- package/dist/common/filesys.js +282 -0
- package/dist/common/host.d.ts +2 -0
- package/dist/common/host.js +67 -0
- package/dist/common/index.d.ts +12 -0
- package/dist/common/index.js +146 -0
- package/dist/common/internet.d.ts +6 -0
- package/dist/common/internet.js +92 -0
- package/dist/common/mappings.d.ts +55 -0
- package/dist/common/mappings.js +4133 -0
- package/dist/common/network.d.ts +8 -0
- package/dist/common/network.js +162 -0
- package/dist/common/nvidia.d.ts +22 -0
- package/dist/common/nvidia.js +159 -0
- package/dist/common/parse.d.ts +13 -0
- package/dist/common/parse.js +157 -0
- package/dist/common/raspberry.d.ts +5 -0
- package/dist/common/raspberry.js +277 -0
- package/dist/common/security.d.ts +31 -0
- package/dist/common/security.js +241 -0
- package/dist/common/types.d.ts +1024 -0
- package/dist/common/types.js +2 -0
- package/dist/common/windows.d.ts +58 -0
- package/dist/common/windows.js +292 -0
- package/dist/cpu-cache.d.ts +1 -0
- package/dist/cpu-cache.js +19 -0
- package/dist/cpu-current-load.d.ts +2 -0
- package/dist/cpu-current-load.js +249 -0
- package/dist/cpu-current-speed.d.ts +3 -0
- package/dist/cpu-current-speed.js +84 -0
- package/dist/cpu-flags.d.ts +1 -0
- package/dist/cpu-flags.js +19 -0
- package/dist/cpu-full-load.d.ts +1 -0
- package/dist/cpu-full-load.js +30 -0
- package/dist/cpu-temperature.d.ts +1 -0
- package/dist/cpu-temperature.js +19 -0
- package/dist/cpu.d.ts +1 -0
- package/dist/cpu.js +19 -0
- package/dist/darwin/audio.d.ts +2 -0
- package/dist/darwin/audio.js +46 -0
- package/dist/darwin/baseboard.d.ts +1 -0
- package/dist/darwin/baseboard.js +48 -0
- package/dist/darwin/battery.d.ts +2 -0
- package/dist/darwin/battery.js +65 -0
- package/dist/darwin/bios.d.ts +1 -0
- package/dist/darwin/bios.js +45 -0
- package/dist/darwin/block-devices.d.ts +2 -0
- package/dist/darwin/block-devices.js +101 -0
- package/dist/darwin/bluetooth.d.ts +3 -0
- package/dist/darwin/bluetooth.js +84 -0
- package/dist/darwin/camera.d.ts +2 -0
- package/dist/darwin/camera.js +55 -0
- package/dist/darwin/chassis.d.ts +2 -0
- package/dist/darwin/chassis.js +32 -0
- package/dist/darwin/cpu-cache.d.ts +2 -0
- package/dist/darwin/cpu-cache.js +29 -0
- package/dist/darwin/cpu-flags.d.ts +1 -0
- package/dist/darwin/cpu-flags.js +16 -0
- package/dist/darwin/cpu-temperature.d.ts +1 -0
- package/dist/darwin/cpu-temperature.js +44 -0
- package/dist/darwin/cpu.d.ts +1 -0
- package/dist/darwin/cpu.js +69 -0
- package/dist/darwin/disk-layout.d.ts +2 -0
- package/dist/darwin/disk-layout.js +231 -0
- package/dist/darwin/disks-io.d.ts +2 -0
- package/dist/darwin/disks-io.js +56 -0
- package/dist/darwin/displays.d.ts +2 -0
- package/dist/darwin/displays.js +98 -0
- package/dist/darwin/fs-open-files.d.ts +2 -0
- package/dist/darwin/fs-open-files.js +27 -0
- package/dist/darwin/fs-stats.d.ts +2 -0
- package/dist/darwin/fs-stats.js +47 -0
- package/dist/darwin/gpu.d.ts +2 -0
- package/dist/darwin/gpu.js +55 -0
- package/dist/darwin/index.d.ts +56 -0
- package/dist/darwin/index.js +122 -0
- package/dist/darwin/keyboard.d.ts +2 -0
- package/dist/darwin/keyboard.js +73 -0
- package/dist/darwin/mem-layout.d.ts +2 -0
- package/dist/darwin/mem-layout.js +60 -0
- package/dist/darwin/mem.d.ts +2 -0
- package/dist/darwin/mem.js +50 -0
- package/dist/darwin/mouse.d.ts +2 -0
- package/dist/darwin/mouse.js +78 -0
- package/dist/darwin/network-connections.d.ts +2 -0
- package/dist/darwin/network-connections.js +98 -0
- package/dist/darwin/network-gateway-default.d.ts +1 -0
- package/dist/darwin/network-gateway-default.js +26 -0
- package/dist/darwin/network-interface-default.d.ts +2 -0
- package/dist/darwin/network-interface-default.js +41 -0
- package/dist/darwin/network-interfaces.d.ts +2 -0
- package/dist/darwin/network-interfaces.js +205 -0
- package/dist/darwin/network-stats.d.ts +2 -0
- package/dist/darwin/network-stats.js +86 -0
- package/dist/darwin/npm.d.ts +1 -0
- package/dist/darwin/npm.js +5 -0
- package/dist/darwin/npu.d.ts +2 -0
- package/dist/darwin/npu.js +41 -0
- package/dist/darwin/os-info.d.ts +2 -0
- package/dist/darwin/os-info.js +140 -0
- package/dist/darwin/pci.d.ts +2 -0
- package/dist/darwin/pci.js +37 -0
- package/dist/darwin/printer.d.ts +2 -0
- package/dist/darwin/printer.js +45 -0
- package/dist/darwin/software.d.ts +2 -0
- package/dist/darwin/software.js +39 -0
- package/dist/darwin/system.d.ts +1 -0
- package/dist/darwin/system.js +29 -0
- package/dist/darwin/thunderbolt.d.ts +1 -0
- package/dist/darwin/thunderbolt.js +53 -0
- package/dist/darwin/usb.d.ts +3 -0
- package/dist/darwin/usb.js +69 -0
- package/dist/darwin/users.d.ts +2 -0
- package/dist/darwin/users.js +13 -0
- package/dist/darwin/uuid.d.ts +2 -0
- package/dist/darwin/uuid.js +39 -0
- package/dist/darwin/wifi-connections.d.ts +2 -0
- package/dist/darwin/wifi-connections.js +60 -0
- package/dist/darwin/wifi-interfaces.d.ts +2 -0
- package/dist/darwin/wifi-interfaces.js +27 -0
- package/dist/darwin/wifi-networks.d.ts +2 -0
- package/dist/darwin/wifi-networks.js +61 -0
- package/dist/disk-layout.d.ts +1 -0
- package/dist/disk-layout.js +17 -0
- package/dist/disks-io.d.ts +1 -0
- package/dist/disks-io.js +17 -0
- package/dist/displays.d.ts +1 -0
- package/dist/displays.js +17 -0
- package/dist/docker-socket.d.ts +11 -0
- package/dist/docker-socket.js +113 -0
- package/dist/docker.d.ts +102 -0
- package/dist/docker.js +532 -0
- package/dist/fs-open-files.d.ts +1 -0
- package/dist/fs-open-files.js +17 -0
- package/dist/fs-size.d.ts +1 -0
- package/dist/fs-size.js +23 -0
- package/dist/fs-stats.d.ts +1 -0
- package/dist/fs-stats.js +17 -0
- package/dist/get-data.d.ts +110 -0
- package/dist/get-data.js +151 -0
- package/dist/get.d.ts +5 -0
- package/dist/get.js +117 -0
- package/dist/gpu.d.ts +1 -0
- package/dist/gpu.js +17 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +132 -0
- package/dist/inet-checksite.d.ts +1 -0
- package/dist/inet-checksite.js +11 -0
- package/dist/inet-latency.d.ts +1 -0
- package/dist/inet-latency.js +17 -0
- package/dist/inet-public-ip.d.ts +2 -0
- package/dist/inet-public-ip.js +10 -0
- package/dist/keyboard.d.ts +1 -0
- package/dist/keyboard.js +17 -0
- package/dist/linux/audio.d.ts +2 -0
- package/dist/linux/audio.js +67 -0
- package/dist/linux/baseboard.d.ts +1 -0
- package/dist/linux/baseboard.js +81 -0
- package/dist/linux/battery.d.ts +2 -0
- package/dist/linux/battery.js +88 -0
- package/dist/linux/bios.d.ts +2 -0
- package/dist/linux/bios.js +55 -0
- package/dist/linux/block-devices.d.ts +2 -0
- package/dist/linux/block-devices.js +30 -0
- package/dist/linux/bluetooth.d.ts +2 -0
- package/dist/linux/bluetooth.js +86 -0
- package/dist/linux/camera.d.ts +2 -0
- package/dist/linux/camera.js +63 -0
- package/dist/linux/chassis.d.ts +1 -0
- package/dist/linux/chassis.js +41 -0
- package/dist/linux/cpu-cache.d.ts +1 -0
- package/dist/linux/cpu-cache.js +35 -0
- package/dist/linux/cpu-flags.d.ts +1 -0
- package/dist/linux/cpu-flags.js +33 -0
- package/dist/linux/cpu-temperature.d.ts +1 -0
- package/dist/linux/cpu-temperature.js +179 -0
- package/dist/linux/cpu.d.ts +1 -0
- package/dist/linux/cpu.js +135 -0
- package/dist/linux/disk-layout.d.ts +2 -0
- package/dist/linux/disk-layout.js +151 -0
- package/dist/linux/disks-io.d.ts +2 -0
- package/dist/linux/disks-io.js +58 -0
- package/dist/linux/displays.d.ts +2 -0
- package/dist/linux/displays.js +193 -0
- package/dist/linux/fs-open-files.d.ts +2 -0
- package/dist/linux/fs-open-files.js +44 -0
- package/dist/linux/fs-size.d.ts +2 -0
- package/dist/linux/fs-size.js +157 -0
- package/dist/linux/fs-stats.d.ts +2 -0
- package/dist/linux/fs-stats.js +65 -0
- package/dist/linux/gpu.d.ts +15 -0
- package/dist/linux/gpu.js +383 -0
- package/dist/linux/index.d.ts +56 -0
- package/dist/linux/index.js +122 -0
- package/dist/linux/inet-latency.d.ts +1 -0
- package/dist/linux/inet-latency.js +39 -0
- package/dist/linux/keyboard.d.ts +2 -0
- package/dist/linux/keyboard.js +61 -0
- package/dist/linux/mem-layout.d.ts +2 -0
- package/dist/linux/mem-layout.js +112 -0
- package/dist/linux/mem.d.ts +2 -0
- package/dist/linux/mem.js +61 -0
- package/dist/linux/mouse.d.ts +2 -0
- package/dist/linux/mouse.js +73 -0
- package/dist/linux/network-connections.d.ts +2 -0
- package/dist/linux/network-connections.js +114 -0
- package/dist/linux/network-gateway-default.d.ts +1 -0
- package/dist/linux/network-gateway-default.js +22 -0
- package/dist/linux/network-interface-default.d.ts +2 -0
- package/dist/linux/network-interface-default.js +46 -0
- package/dist/linux/network-interfaces.d.ts +3 -0
- package/dist/linux/network-interfaces.js +353 -0
- package/dist/linux/network-stats.d.ts +2 -0
- package/dist/linux/network-stats.js +99 -0
- package/dist/linux/npm.d.ts +1 -0
- package/dist/linux/npm.js +5 -0
- package/dist/linux/npu.d.ts +2 -0
- package/dist/linux/npu.js +77 -0
- package/dist/linux/os-info.d.ts +1 -0
- package/dist/linux/os-info.js +114 -0
- package/dist/linux/pci.d.ts +2 -0
- package/dist/linux/pci.js +56 -0
- package/dist/linux/printer.d.ts +2 -0
- package/dist/linux/printer.js +80 -0
- package/dist/linux/process-load.d.ts +2 -0
- package/dist/linux/process-load.js +164 -0
- package/dist/linux/processes.d.ts +2 -0
- package/dist/linux/processes.js +358 -0
- package/dist/linux/services.d.ts +2 -0
- package/dist/linux/services.js +222 -0
- package/dist/linux/software.d.ts +2 -0
- package/dist/linux/software.js +110 -0
- package/dist/linux/system.d.ts +1 -0
- package/dist/linux/system.js +186 -0
- package/dist/linux/thunderbolt.d.ts +2 -0
- package/dist/linux/thunderbolt.js +51 -0
- package/dist/linux/time.d.ts +6 -0
- package/dist/linux/time.js +28 -0
- package/dist/linux/usb.d.ts +2 -0
- package/dist/linux/usb.js +62 -0
- package/dist/linux/users.d.ts +2 -0
- package/dist/linux/users.js +102 -0
- package/dist/linux/uuid.d.ts +2 -0
- package/dist/linux/uuid.js +44 -0
- package/dist/linux/wifi-connections.d.ts +2 -0
- package/dist/linux/wifi-connections.js +196 -0
- package/dist/linux/wifi-interfaces.d.ts +2 -0
- package/dist/linux/wifi-interfaces.js +96 -0
- package/dist/linux/wifi-networks.d.ts +2 -0
- package/dist/linux/wifi-networks.js +176 -0
- package/dist/mem-layout.d.ts +1 -0
- package/dist/mem-layout.js +17 -0
- package/dist/mem.d.ts +1 -0
- package/dist/mem.js +19 -0
- package/dist/mouse.d.ts +1 -0
- package/dist/mouse.js +17 -0
- package/dist/network-connections.d.ts +1 -0
- package/dist/network-connections.js +17 -0
- package/dist/network-gateway-default.d.ts +1 -0
- package/dist/network-gateway-default.js +17 -0
- package/dist/network-interface-default.d.ts +1 -0
- package/dist/network-interface-default.js +17 -0
- package/dist/network-interfaces.d.ts +1 -0
- package/dist/network-interfaces.js +18 -0
- package/dist/network-stats.d.ts +1 -0
- package/dist/network-stats.js +19 -0
- package/dist/npm.d.ts +2 -0
- package/dist/npm.js +22 -0
- package/dist/npu.d.ts +1 -0
- package/dist/npu.js +17 -0
- package/dist/observe.d.ts +5 -0
- package/dist/observe.js +16 -0
- package/dist/os-info.d.ts +1 -0
- package/dist/os-info.js +21 -0
- package/dist/pci.d.ts +1 -0
- package/dist/pci.js +17 -0
- package/dist/printer.d.ts +1 -0
- package/dist/printer.js +17 -0
- package/dist/process-load.d.ts +1 -0
- package/dist/process-load.js +15 -0
- package/dist/processes.d.ts +1 -0
- package/dist/processes.js +15 -0
- package/dist/services.d.ts +1 -0
- package/dist/services.js +15 -0
- package/dist/shell.d.ts +1 -0
- package/dist/shell.js +16 -0
- package/dist/software.d.ts +1 -0
- package/dist/software.js +17 -0
- package/dist/sun/index.d.ts +17 -0
- package/dist/sun/index.js +43 -0
- package/dist/sun/inet-latency.d.ts +1 -0
- package/dist/sun/inet-latency.js +30 -0
- package/dist/sun/os-info.d.ts +1 -0
- package/dist/sun/os-info.js +26 -0
- package/dist/sun/users.d.ts +2 -0
- package/dist/sun/users.js +13 -0
- package/dist/system.d.ts +1 -0
- package/dist/system.js +17 -0
- package/dist/thunderbolt.d.ts +1 -0
- package/dist/thunderbolt.js +17 -0
- package/dist/time.d.ts +6 -0
- package/dist/time.js +28 -0
- package/dist/usb.d.ts +1 -0
- package/dist/usb.js +17 -0
- package/dist/users.d.ts +1 -0
- package/dist/users.js +21 -0
- package/dist/uuid.d.ts +1 -0
- package/dist/uuid.js +19 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +16 -0
- package/dist/versions.d.ts +2 -0
- package/dist/versions.js +1150 -0
- package/dist/virtualbox.d.ts +2 -0
- package/dist/virtualbox.js +89 -0
- package/dist/wifi-connections.d.ts +1 -0
- package/dist/wifi-connections.js +17 -0
- package/dist/wifi-interfaces.d.ts +1 -0
- package/dist/wifi-interfaces.js +17 -0
- package/dist/wifi-networks.d.ts +1 -0
- package/dist/wifi-networks.js +17 -0
- package/dist/windows/audio.d.ts +2 -0
- package/dist/windows/audio.js +23 -0
- package/dist/windows/baseboard.d.ts +1 -0
- package/dist/windows/baseboard.js +35 -0
- package/dist/windows/battery.d.ts +1 -0
- package/dist/windows/battery.js +81 -0
- package/dist/windows/bios.d.ts +1 -0
- package/dist/windows/bios.js +37 -0
- package/dist/windows/block-devices.d.ts +3 -0
- package/dist/windows/block-devices.js +58 -0
- package/dist/windows/bluetooth.d.ts +2 -0
- package/dist/windows/bluetooth.js +31 -0
- package/dist/windows/camera.d.ts +2 -0
- package/dist/windows/camera.js +47 -0
- package/dist/windows/chassis.d.ts +1 -0
- package/dist/windows/chassis.js +29 -0
- package/dist/windows/cpu-cache.d.ts +2 -0
- package/dist/windows/cpu-cache.js +59 -0
- package/dist/windows/cpu-flags.d.ts +1 -0
- package/dist/windows/cpu-flags.js +61 -0
- package/dist/windows/cpu-temperature.d.ts +1 -0
- package/dist/windows/cpu-temperature.js +32 -0
- package/dist/windows/cpu.d.ts +1 -0
- package/dist/windows/cpu.js +96 -0
- package/dist/windows/disk-layout.d.ts +2 -0
- package/dist/windows/disk-layout.js +129 -0
- package/dist/windows/disks-io.d.ts +2 -0
- package/dist/windows/disks-io.js +46 -0
- package/dist/windows/displays.d.ts +2 -0
- package/dist/windows/displays.js +213 -0
- package/dist/windows/fs-open-files.d.ts +2 -0
- package/dist/windows/fs-open-files.js +22 -0
- package/dist/windows/fs-size.d.ts +2 -0
- package/dist/windows/fs-size.js +47 -0
- package/dist/windows/fs-stats.d.ts +2 -0
- package/dist/windows/fs-stats.js +37 -0
- package/dist/windows/gpu.d.ts +2 -0
- package/dist/windows/gpu.js +128 -0
- package/dist/windows/index.d.ts +56 -0
- package/dist/windows/index.js +122 -0
- package/dist/windows/inet-latency.d.ts +1 -0
- package/dist/windows/inet-latency.js +34 -0
- package/dist/windows/keyboard.d.ts +2 -0
- package/dist/windows/keyboard.js +47 -0
- package/dist/windows/mem-layout.d.ts +2 -0
- package/dist/windows/mem-layout.js +39 -0
- package/dist/windows/mem.d.ts +2 -0
- package/dist/windows/mem.js +33 -0
- package/dist/windows/mouse.d.ts +2 -0
- package/dist/windows/mouse.js +64 -0
- package/dist/windows/network-connections.d.ts +2 -0
- package/dist/windows/network-connections.js +93 -0
- package/dist/windows/network-gateway-default.d.ts +1 -0
- package/dist/windows/network-gateway-default.js +36 -0
- package/dist/windows/network-interface-default.d.ts +2 -0
- package/dist/windows/network-interface-default.js +56 -0
- package/dist/windows/network-interfaces.d.ts +2 -0
- package/dist/windows/network-interfaces.js +346 -0
- package/dist/windows/network-stats.d.ts +2 -0
- package/dist/windows/network-stats.js +135 -0
- package/dist/windows/npm.d.ts +1 -0
- package/dist/windows/npm.js +5 -0
- package/dist/windows/npu.d.ts +2 -0
- package/dist/windows/npu.js +29 -0
- package/dist/windows/os-info.d.ts +1 -0
- package/dist/windows/os-info.js +70 -0
- package/dist/windows/pci.d.ts +2 -0
- package/dist/windows/pci.js +33 -0
- package/dist/windows/printer.d.ts +2 -0
- package/dist/windows/printer.js +36 -0
- package/dist/windows/process-load.d.ts +2 -0
- package/dist/windows/process-load.js +121 -0
- package/dist/windows/processes.d.ts +9 -0
- package/dist/windows/processes.js +139 -0
- package/dist/windows/services.d.ts +2 -0
- package/dist/windows/services.js +83 -0
- package/dist/windows/shell.d.ts +1 -0
- package/dist/windows/shell.js +19 -0
- package/dist/windows/software.d.ts +2 -0
- package/dist/windows/software.js +53 -0
- package/dist/windows/system.d.ts +1 -0
- package/dist/windows/system.js +98 -0
- package/dist/windows/thunderbolt.d.ts +2 -0
- package/dist/windows/thunderbolt.js +34 -0
- package/dist/windows/usb.d.ts +2 -0
- package/dist/windows/usb.js +37 -0
- package/dist/windows/users.d.ts +2 -0
- package/dist/windows/users.js +151 -0
- package/dist/windows/uuid.d.ts +2 -0
- package/dist/windows/uuid.js +28 -0
- package/dist/windows/wifi-connections.d.ts +2 -0
- package/dist/windows/wifi-connections.js +56 -0
- package/dist/windows/wifi-interfaces.d.ts +2 -0
- package/dist/windows/wifi-interfaces.js +45 -0
- package/dist/windows/wifi-networks.d.ts +2 -0
- package/dist/windows/wifi-networks.js +50 -0
- package/package.json +78 -12
- package/lib/audio.js +0 -277
- package/lib/battery.js +0 -334
- package/lib/bluetooth.js +0 -315
- package/lib/bluetoothVendors.js +0 -1138
- package/lib/cli.js +0 -100
- package/lib/cpu.js +0 -2285
- package/lib/docker.js +0 -791
- package/lib/dockerSocket.js +0 -117
- package/lib/filesystem.js +0 -1849
- package/lib/graphics.js +0 -1321
- package/lib/index.d.ts +0 -1051
- package/lib/index.js +0 -520
- package/lib/internet.js +0 -259
- package/lib/memory.js +0 -622
- package/lib/network.js +0 -2008
- package/lib/osinfo.js +0 -1322
- package/lib/printer.js +0 -209
- package/lib/processes.js +0 -1459
- package/lib/system.js +0 -855
- package/lib/usb.js +0 -309
- package/lib/users.js +0 -412
- package/lib/util.js +0 -2833
- package/lib/virtualbox.js +0 -116
- package/lib/wifi.js +0 -839
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.system = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const system = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const result = (0, common_1.cloneObj)(defaults_1.initSystem);
|
|
10
|
+
try {
|
|
11
|
+
let stdout = (await windows_1.ps.exec('Get-CimInstance Win32_ComputerSystemProduct | select Name,Vendor,Version,IdentifyingNumber,UUID | fl')).toString();
|
|
12
|
+
if (stdout) {
|
|
13
|
+
let lines = stdout.split('\r\n');
|
|
14
|
+
result.manufacturer = (0, common_1.getValue)(lines, 'vendor', ':');
|
|
15
|
+
result.model = (0, common_1.getValue)(lines, 'name', ':');
|
|
16
|
+
result.version = (0, common_1.getValue)(lines, 'version', ':');
|
|
17
|
+
result.serial = (0, common_1.getValue)(lines, 'identifyingnumber', ':');
|
|
18
|
+
result.uuid = (0, common_1.getValue)(lines, 'uuid', ':').toLowerCase();
|
|
19
|
+
const model = result.model.toLowerCase();
|
|
20
|
+
if (model === 'virtualbox' || model === 'kvm' || model === 'virtual machine' || model === 'bochs' || model.startsWith('vmware') || model.startsWith('qemu') || model.startsWith('parallels')) {
|
|
21
|
+
result.virtual = true;
|
|
22
|
+
if (model.startsWith('virtualbox')) {
|
|
23
|
+
result.virtualHost = 'VirtualBox';
|
|
24
|
+
}
|
|
25
|
+
if (model.startsWith('vmware')) {
|
|
26
|
+
result.virtualHost = 'VMware';
|
|
27
|
+
}
|
|
28
|
+
if (model.startsWith('kvm')) {
|
|
29
|
+
result.virtualHost = 'KVM';
|
|
30
|
+
}
|
|
31
|
+
if (model.startsWith('bochs')) {
|
|
32
|
+
result.virtualHost = 'bochs';
|
|
33
|
+
}
|
|
34
|
+
if (model.startsWith('qemu')) {
|
|
35
|
+
result.virtualHost = 'KVM';
|
|
36
|
+
}
|
|
37
|
+
if (model.startsWith('parallels')) {
|
|
38
|
+
result.virtualHost = 'Parallels';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const manufacturer = result.manufacturer.toLowerCase();
|
|
42
|
+
if (manufacturer.startsWith('vmware') || manufacturer.startsWith('qemu') || manufacturer === 'xen' || manufacturer.startsWith('parallels')) {
|
|
43
|
+
result.virtual = true;
|
|
44
|
+
if (manufacturer.startsWith('vmware')) {
|
|
45
|
+
result.virtualHost = 'VMware';
|
|
46
|
+
}
|
|
47
|
+
if (manufacturer.startsWith('xen')) {
|
|
48
|
+
result.virtualHost = 'Xen';
|
|
49
|
+
}
|
|
50
|
+
if (manufacturer.startsWith('qemu')) {
|
|
51
|
+
result.virtualHost = 'KVM';
|
|
52
|
+
}
|
|
53
|
+
if (manufacturer.startsWith('parallels')) {
|
|
54
|
+
result.virtualHost = 'Parallels';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
stdout = (await windows_1.ps.exec('Get-CimInstance MS_Systeminformation -Namespace "root/wmi" | select systemsku | fl')).toString();
|
|
58
|
+
if (stdout) {
|
|
59
|
+
lines = stdout.split('\r\n');
|
|
60
|
+
result.sku = (0, common_1.getValue)(lines, 'systemsku', ':');
|
|
61
|
+
}
|
|
62
|
+
if (!result.virtual) {
|
|
63
|
+
stdout = (await windows_1.ps.exec('Get-CimInstance Win32_bios | select Version, SerialNumber, SMBIOSBIOSVersion')).toString();
|
|
64
|
+
if (stdout) {
|
|
65
|
+
if (stdout.indexOf('VRTUAL') >= 0 ||
|
|
66
|
+
stdout.indexOf('A M I ') >= 0 ||
|
|
67
|
+
stdout.indexOf('VirtualBox') >= 0 ||
|
|
68
|
+
stdout.indexOf('VMWare') >= 0 ||
|
|
69
|
+
stdout.indexOf('Xen') >= 0 ||
|
|
70
|
+
stdout.indexOf('Parallels') >= 0) {
|
|
71
|
+
result.virtual = true;
|
|
72
|
+
if (stdout.indexOf('VirtualBox') >= 0 && !result.virtualHost) {
|
|
73
|
+
result.virtualHost = 'VirtualBox';
|
|
74
|
+
}
|
|
75
|
+
if (stdout.indexOf('VMware') >= 0 && !result.virtualHost) {
|
|
76
|
+
result.virtualHost = 'VMware';
|
|
77
|
+
}
|
|
78
|
+
if (stdout.indexOf('Xen') >= 0 && !result.virtualHost) {
|
|
79
|
+
result.virtualHost = 'Xen';
|
|
80
|
+
}
|
|
81
|
+
if (stdout.indexOf('VRTUAL') >= 0 && !result.virtualHost) {
|
|
82
|
+
result.virtualHost = 'Hyper-V';
|
|
83
|
+
}
|
|
84
|
+
if (stdout.indexOf('A M I') >= 0 && !result.virtualHost) {
|
|
85
|
+
result.virtualHost = 'Virtual PC';
|
|
86
|
+
}
|
|
87
|
+
if (stdout.indexOf('Parallels') >= 0 && !result.virtualHost) {
|
|
88
|
+
result.virtualHost = 'Parallels';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch { }
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
exports.system = system;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.thunderbolt = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const windows_1 = require("../common/windows");
|
|
6
|
+
const parseType = (name) => {
|
|
7
|
+
if (name.toLowerCase().includes('host router') || name.toLowerCase().includes('controller')) {
|
|
8
|
+
return 'host';
|
|
9
|
+
}
|
|
10
|
+
if (name.toLowerCase().includes('device router')) {
|
|
11
|
+
return 'device';
|
|
12
|
+
}
|
|
13
|
+
return '';
|
|
14
|
+
};
|
|
15
|
+
const thunderbolt = async () => {
|
|
16
|
+
await (0, common_1.nextTick)();
|
|
17
|
+
try {
|
|
18
|
+
const data = await windows_1.ps.exec("@(Get-CimInstance Win32_PnPEntity | Where-Object { $_.PNPClass -eq 'USB4' -or $_.Name -like '*Thunderbolt*' } | Select-Object Name,DeviceID,PNPClass) | ConvertTo-Json -Depth 3");
|
|
19
|
+
return (0, windows_1.psArray)(data).map((element) => {
|
|
20
|
+
const name = (element.Name || '').trim();
|
|
21
|
+
return {
|
|
22
|
+
name,
|
|
23
|
+
uuid: '',
|
|
24
|
+
bus: null,
|
|
25
|
+
type: parseType(name),
|
|
26
|
+
speed: 0
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.thunderbolt = thunderbolt;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usb = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const mappings_1 = require("../common/mappings");
|
|
7
|
+
const windows_1 = require("../common/windows");
|
|
8
|
+
function parseUsb(lines, id) {
|
|
9
|
+
const usbType = (0, mappings_1.usbWindowsType)((0, common_1.getValue)(lines, 'CreationClassName', ':').toLowerCase(), (0, common_1.getValue)(lines, 'name', ':').toLowerCase());
|
|
10
|
+
if (usbType) {
|
|
11
|
+
return {
|
|
12
|
+
...(0, common_1.cloneObj)(defaults_1.initUsbResult),
|
|
13
|
+
id: id,
|
|
14
|
+
deviceId: (0, common_1.getValue)(lines, 'deviceid', ':'),
|
|
15
|
+
name: (0, common_1.getValue)(lines, 'name', ':'),
|
|
16
|
+
type: usbType,
|
|
17
|
+
manufacturer: (0, common_1.getValue)(lines, 'Manufacturer', ':')
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const usb = async () => {
|
|
25
|
+
await (0, common_1.nextTick)();
|
|
26
|
+
const result = [];
|
|
27
|
+
const stdout = await windows_1.ps.exec('Get-CimInstance CIM_LogicalDevice | where { $_.Description -match "USB"} | select Name,CreationClassName,DeviceId,Manufacturer | fl');
|
|
28
|
+
const parts = stdout.toString().split(/\n\s*\n/);
|
|
29
|
+
for (let i = 0; i < parts.length; i++) {
|
|
30
|
+
const usb = parseUsb(parts[i].split('\n'), i);
|
|
31
|
+
if (usb && result.filter((x) => x.deviceId === usb.deviceId).length === 0) {
|
|
32
|
+
result.push(usb);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
exports.usb = usb;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.users = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const windows_1 = require("../common/windows");
|
|
6
|
+
const parseWinSessions = (sessionParts) => {
|
|
7
|
+
const sessions = {};
|
|
8
|
+
sessionParts.forEach((session) => {
|
|
9
|
+
const lines = session.split('\r\n');
|
|
10
|
+
const id = (0, common_1.getValue)(lines, 'LogonId');
|
|
11
|
+
const starttime = (0, common_1.getValue)(lines, 'starttime');
|
|
12
|
+
if (id) {
|
|
13
|
+
sessions[id] = starttime;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return sessions;
|
|
17
|
+
};
|
|
18
|
+
function fuzzyMatch(name1, name2) {
|
|
19
|
+
name1 = name1.toLowerCase();
|
|
20
|
+
name2 = name2.toLowerCase();
|
|
21
|
+
let eq = 0;
|
|
22
|
+
let len = name1.length;
|
|
23
|
+
if (name2.length > len) {
|
|
24
|
+
len = name2.length;
|
|
25
|
+
}
|
|
26
|
+
for (let i = 0; i < len; i++) {
|
|
27
|
+
const c1 = name1[i] || '';
|
|
28
|
+
const c2 = name2[i] || '';
|
|
29
|
+
if (c1 === c2) {
|
|
30
|
+
eq++;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return len > 10 ? eq / len > 0.9 : len > 0 ? eq / len > 0.8 : false;
|
|
34
|
+
}
|
|
35
|
+
function parseWinUsers(userParts, userQuery) {
|
|
36
|
+
const users = [];
|
|
37
|
+
userParts.forEach((user) => {
|
|
38
|
+
const lines = user.split('\r\n');
|
|
39
|
+
const domain = (0, common_1.getValue)(lines, 'domain', ':', true);
|
|
40
|
+
const username = (0, common_1.getValue)(lines, 'user', ':', true);
|
|
41
|
+
const sessionid = (0, common_1.getValue)(lines, 'sessionid', ':', true);
|
|
42
|
+
if (username) {
|
|
43
|
+
const quser = userQuery.filter((item) => fuzzyMatch(item.user, username));
|
|
44
|
+
users.push({
|
|
45
|
+
domain,
|
|
46
|
+
user: username,
|
|
47
|
+
tty: quser?.[0]?.tty ? quser[0].tty : sessionid
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return users;
|
|
52
|
+
}
|
|
53
|
+
function parseWinLoggedOn(loggedonParts) {
|
|
54
|
+
const loggedons = {};
|
|
55
|
+
loggedonParts.forEach((loggedon) => {
|
|
56
|
+
const lines = loggedon.split('\r\n');
|
|
57
|
+
const antecendent = (0, common_1.getValue)(lines, 'antecedent', ':', true);
|
|
58
|
+
let parts = antecendent.split('=');
|
|
59
|
+
const name = parts.length > 2 ? parts[1].split(',')[0].replace(/"/g, '').trim() : '';
|
|
60
|
+
const domain = parts.length > 2 ? parts[2].replace(/"/g, '').replace(/\)/g, '').trim() : '';
|
|
61
|
+
const dependent = (0, common_1.getValue)(lines, 'dependent', ':', true);
|
|
62
|
+
parts = dependent.split('=');
|
|
63
|
+
const id = parts.length > 1 ? parts[1].replace(/"/g, '').replace(/\)/g, '').trim() : '';
|
|
64
|
+
if (id) {
|
|
65
|
+
loggedons[id] = {
|
|
66
|
+
domain,
|
|
67
|
+
user: name
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return loggedons;
|
|
72
|
+
}
|
|
73
|
+
const parseWinUsersQuery = (lines) => {
|
|
74
|
+
lines = lines.filter((item) => item);
|
|
75
|
+
const result = [];
|
|
76
|
+
const header = lines[0];
|
|
77
|
+
const headerDelimiter = [];
|
|
78
|
+
if (header) {
|
|
79
|
+
const start = header[0] === ' ' ? 1 : 0;
|
|
80
|
+
headerDelimiter.push(start - 1);
|
|
81
|
+
let nextSpace = 0;
|
|
82
|
+
for (let i = start + 1; i < header.length; i++) {
|
|
83
|
+
if (header[i] === ' ' && (header[i - 1] === ' ' || header[i - 1] === '.')) {
|
|
84
|
+
nextSpace = i;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
if (nextSpace) {
|
|
88
|
+
headerDelimiter.push(nextSpace);
|
|
89
|
+
nextSpace = 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
for (let i = 1; i < lines.length; i++) {
|
|
94
|
+
if (lines[i].trim()) {
|
|
95
|
+
const user = lines[i].substring(headerDelimiter[0] + 1, headerDelimiter[1]).trim() || '';
|
|
96
|
+
const tty = lines[i].substring(headerDelimiter[1] + 1, headerDelimiter[2] - 2).trim() || '';
|
|
97
|
+
result.push({
|
|
98
|
+
user: user,
|
|
99
|
+
tty: tty
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
};
|
|
106
|
+
const users = async () => {
|
|
107
|
+
await (0, common_1.nextTick)();
|
|
108
|
+
const result = [];
|
|
109
|
+
try {
|
|
110
|
+
let cmd = "$ErrorActionPreference = 'SilentlyContinue'; ";
|
|
111
|
+
cmd += 'Get-CimInstance Win32_LogonSession | select LogonId,@{n="StartTime";e={$_.StartTime.ToString("yyyy-MM-dd HH:mm:ss")}} | fl' + "; echo '#-#-#-#';";
|
|
112
|
+
cmd += 'Get-CimInstance Win32_LoggedOnUser | select antecedent,dependent | fl ' + "; echo '#-#-#-#';";
|
|
113
|
+
cmd +=
|
|
114
|
+
"$process = @(Get-CimInstance Win32_Process -Filter \"name = 'explorer.exe'\"); if ($process.Count -gt 0) { Invoke-CimMethod -InputObject $process[0] -MethodName GetOwner | select user, domain | fl; get-process -name explorer | select-object sessionid | fl }; echo '#-#-#-#';";
|
|
115
|
+
cmd += 'query user';
|
|
116
|
+
const stdout = await windows_1.ps.exec(cmd);
|
|
117
|
+
const data = stdout ? stdout.toString().split('#-#-#-#') : ['', '', '', ''];
|
|
118
|
+
const sessions = parseWinSessions((data[0] || '').split(/\n\s*\n/));
|
|
119
|
+
const loggedons = parseWinLoggedOn((data[1] || '').split(/\n\s*\n/));
|
|
120
|
+
const queryUser = parseWinUsersQuery((data[3] || '').split('\r\n'));
|
|
121
|
+
const users = parseWinUsers((data[2] || '').split(/\n\s*\n/), queryUser);
|
|
122
|
+
for (const id in loggedons) {
|
|
123
|
+
if (Object.prototype.hasOwnProperty.call(loggedons, id)) {
|
|
124
|
+
loggedons[id].dateTime = Object.prototype.hasOwnProperty.call(sessions, id) ? sessions[id] : '';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
users.forEach((user) => {
|
|
128
|
+
let dateTime = '';
|
|
129
|
+
for (const id in loggedons) {
|
|
130
|
+
if (Object.prototype.hasOwnProperty.call(loggedons, id)) {
|
|
131
|
+
if (loggedons[id].user === user.user && (!dateTime || dateTime < loggedons[id].dateTime)) {
|
|
132
|
+
dateTime = loggedons[id].dateTime;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
result.push({
|
|
137
|
+
user: user.user,
|
|
138
|
+
tty: user.tty,
|
|
139
|
+
date: `${dateTime.substring(0, 10)}`,
|
|
140
|
+
time: `${dateTime.substring(11, 19)}`,
|
|
141
|
+
ip: '',
|
|
142
|
+
command: ''
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
exports.users = users;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuid = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const const_1 = require("../common/const");
|
|
6
|
+
const defaults_1 = require("../common/defaults");
|
|
7
|
+
const exec_1 = require("../common/exec");
|
|
8
|
+
const windows_1 = require("../common/windows");
|
|
9
|
+
const uuid = async () => {
|
|
10
|
+
await (0, common_1.nextTick)();
|
|
11
|
+
const result = (0, common_1.cloneObj)(defaults_1.initUUID);
|
|
12
|
+
try {
|
|
13
|
+
let sysdir = '%windir%\\System32';
|
|
14
|
+
if (process.arch === 'ia32' && Object.prototype.hasOwnProperty.call(process.env, 'PROCESSOR_ARCHITEW6432')) {
|
|
15
|
+
sysdir = '%windir%\\sysnative\\cmd.exe /c %windir%\\System32';
|
|
16
|
+
}
|
|
17
|
+
const psOut = await windows_1.ps.exec('Get-CimInstance Win32_ComputerSystemProduct | select UUID | fl');
|
|
18
|
+
const lines = psOut.toString().split('\r\n');
|
|
19
|
+
result.hardware = (0, common_1.getValue)(lines, 'uuid', ':').toLowerCase();
|
|
20
|
+
const { stdout } = await (0, exec_1.exec)(`${sysdir}\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid`, const_1.execOptsWin);
|
|
21
|
+
const parts = stdout.toString().split('\n\r')[0].split('REG_SZ');
|
|
22
|
+
result.os = parts.length > 1 ? parts[1].replace(/\r+|\n+|\s+/gi, '').toLowerCase() : '';
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
catch { }
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
exports.uuid = uuid;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wifiConnections = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const network_1 = require("../common/network");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const wifiConnections = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const result = [];
|
|
10
|
+
let stdout = '';
|
|
11
|
+
try {
|
|
12
|
+
stdout = String((await windows_1.ps.exec('netsh wlan show interfaces')) || '');
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
const allLines = stdout.split('\r\n');
|
|
18
|
+
for (let i = 0; i < allLines.length; i++) {
|
|
19
|
+
allLines[i] = allLines[i].trim();
|
|
20
|
+
}
|
|
21
|
+
const parts = allLines.join('\r\n').split(':\r\n\r\n').splice(1);
|
|
22
|
+
parts.forEach((part) => {
|
|
23
|
+
const lines = part.split('\r\n');
|
|
24
|
+
if (lines.length >= 5) {
|
|
25
|
+
const networkInterface = lines[0].indexOf(':') >= 0 ? lines[0].split(':')[1].trim() : '';
|
|
26
|
+
const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : '';
|
|
27
|
+
const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : '';
|
|
28
|
+
const ssid = (0, common_1.getValue)(lines, 'SSID', ':', true);
|
|
29
|
+
const bssid = (0, common_1.getValue)(lines, 'BSSID', ':', true) || (0, common_1.getValue)(lines, 'AP BSSID', ':', true);
|
|
30
|
+
const quality = (0, common_1.getValue)(lines, 'Signal', ':', true);
|
|
31
|
+
const signalLevel = (0, network_1.wifiDBFromQuality)(quality);
|
|
32
|
+
const type = (0, common_1.getValue)(lines, 'Radio type', ':', true) || (0, common_1.getValue)(lines, 'Type de radio', ':', true) || (0, common_1.getValue)(lines, 'Funktyp', ':', true) || null;
|
|
33
|
+
const security = (0, common_1.getValue)(lines, 'authentication', ':', true) || (0, common_1.getValue)(lines, 'Authentification', ':', true) || (0, common_1.getValue)(lines, 'Authentifizierung', ':', true) || null;
|
|
34
|
+
const channel = (0, common_1.toInt)((0, common_1.getValue)(lines, 'Channel', ':', true) || (0, common_1.getValue)(lines, 'Canal', ':', true) || (0, common_1.getValue)(lines, 'Kanal', ':', true)) || null;
|
|
35
|
+
const txRate = (0, common_1.getValue)(lines, 'Transmit rate (mbps)', ':', true) || (0, common_1.getValue)(lines, 'Transmission (mbit/s)', ':', true) || (0, common_1.getValue)(lines, 'Empfangsrate (MBit/s)', ':', true) || null;
|
|
36
|
+
if (model && id && ssid && bssid) {
|
|
37
|
+
result.push({
|
|
38
|
+
id,
|
|
39
|
+
networkInterface,
|
|
40
|
+
model,
|
|
41
|
+
ssid,
|
|
42
|
+
bssid,
|
|
43
|
+
channel: channel,
|
|
44
|
+
frequency: channel ? (0, network_1.wifiFrequencyFromChannel)(channel) : null,
|
|
45
|
+
type,
|
|
46
|
+
security,
|
|
47
|
+
signalLevel,
|
|
48
|
+
quality: quality ? parseInt(quality, 10) : null,
|
|
49
|
+
txRate: (0, common_1.toInt)(txRate) || null
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
exports.wifiConnections = wifiConnections;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wifiInterfaces = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const mappings_1 = require("../common/mappings");
|
|
6
|
+
const windows_1 = require("../common/windows");
|
|
7
|
+
const wifiInterfaces = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const result = [];
|
|
10
|
+
let stdout = '';
|
|
11
|
+
try {
|
|
12
|
+
stdout = String((await windows_1.ps.exec('netsh wlan show interfaces')) || '');
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
const allLines = stdout.split('\r\n');
|
|
18
|
+
for (let i = 0; i < allLines.length; i++) {
|
|
19
|
+
allLines[i] = allLines[i].trim();
|
|
20
|
+
}
|
|
21
|
+
const parts = allLines.join('\r\n').split(':\r\n\r\n').splice(1);
|
|
22
|
+
parts.forEach((part) => {
|
|
23
|
+
const lines = part.split('\r\n');
|
|
24
|
+
if (lines.length >= 5) {
|
|
25
|
+
const networkInterface = lines[0].indexOf(':') >= 0 ? lines[0].split(':')[1].trim() : '';
|
|
26
|
+
const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : '';
|
|
27
|
+
const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : '';
|
|
28
|
+
let macParts = lines[3].indexOf(':') >= 0 ? lines[3].split(':') : [];
|
|
29
|
+
macParts = macParts.splice(1);
|
|
30
|
+
const mac = macParts.join(':').trim();
|
|
31
|
+
const vendor = (0, mappings_1.wifiVendor)(model);
|
|
32
|
+
if (networkInterface && model && id && mac) {
|
|
33
|
+
result.push({
|
|
34
|
+
id,
|
|
35
|
+
networkInterface,
|
|
36
|
+
model,
|
|
37
|
+
vendor,
|
|
38
|
+
mac
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
exports.wifiInterfaces = wifiInterfaces;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wifiNetworks = void 0;
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const network_1 = require("../common/network");
|
|
7
|
+
const windows_1 = require("../common/windows");
|
|
8
|
+
const wifiNetworks = async () => {
|
|
9
|
+
await (0, common_1.nextTick)();
|
|
10
|
+
const result = [];
|
|
11
|
+
let stdout = '';
|
|
12
|
+
try {
|
|
13
|
+
stdout = String((await windows_1.ps.exec('netsh wlan show networks mode=Bssid')) || '');
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
const ssidParts = stdout.split(`${node_os_1.EOL + node_os_1.EOL}SSID `).splice(1);
|
|
19
|
+
ssidParts.forEach((ssidPart) => {
|
|
20
|
+
const ssidLines = ssidPart.split(node_os_1.EOL);
|
|
21
|
+
if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(':') >= 0) {
|
|
22
|
+
const bssidsParts = ssidPart.split(' BSSID').splice(1);
|
|
23
|
+
bssidsParts.forEach((bssidPart) => {
|
|
24
|
+
const bssidLines = bssidPart.split(node_os_1.EOL);
|
|
25
|
+
const bssidLine = bssidLines[0].split(':').splice(1);
|
|
26
|
+
const bssid = bssidLine.join(':').trim().toLowerCase();
|
|
27
|
+
if (bssid && bssidLines && bssidLines.length > 3) {
|
|
28
|
+
const channel = (0, common_1.toInt)((bssidLines[3].split(':').pop() || '').trim());
|
|
29
|
+
const quality = (bssidLines[1].split(':').pop() || '').trim();
|
|
30
|
+
const securityStr = (ssidLines[2].split(':').pop() || '').trim();
|
|
31
|
+
const wpaStr = (ssidLines[3].split(':').pop() || '').trim();
|
|
32
|
+
result.push({
|
|
33
|
+
ssid: (ssidLines[0].split(':').pop() || '').trim(),
|
|
34
|
+
bssid,
|
|
35
|
+
mode: '',
|
|
36
|
+
channel: channel || null,
|
|
37
|
+
frequency: (0, network_1.wifiFrequencyFromChannel)(channel),
|
|
38
|
+
signalLevel: (0, network_1.wifiDBFromQuality)(quality),
|
|
39
|
+
quality: quality ? parseInt(quality, 10) : null,
|
|
40
|
+
security: securityStr ? [securityStr] : [],
|
|
41
|
+
wpaFlags: wpaStr ? [wpaStr] : [],
|
|
42
|
+
rsnFlags: []
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
exports.wifiNetworks = wifiNetworks;
|
package/package.json
CHANGED
|
@@ -1,23 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|
|
7
7
|
"homepage": "https://systeminformation.io",
|
|
8
|
-
"main": "./
|
|
9
|
-
"type": "commonjs",
|
|
8
|
+
"main": "./dist/index.js",
|
|
10
9
|
"bin": {
|
|
11
|
-
"systeminformation": "
|
|
10
|
+
"systeminformation": "dist/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./linux": {
|
|
19
|
+
"types": "./dist/linux/index.d.ts",
|
|
20
|
+
"default": "./dist/linux/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./darwin": {
|
|
23
|
+
"types": "./dist/darwin/index.d.ts",
|
|
24
|
+
"default": "./dist/darwin/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./windows": {
|
|
27
|
+
"types": "./dist/windows/index.d.ts",
|
|
28
|
+
"default": "./dist/windows/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./bsd": {
|
|
31
|
+
"types": "./dist/bsd/index.d.ts",
|
|
32
|
+
"default": "./dist/bsd/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./sun": {
|
|
35
|
+
"types": "./dist/sun/index.d.ts",
|
|
36
|
+
"default": "./dist/sun/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./*": {
|
|
40
|
+
"types": "./dist/*.d.ts",
|
|
41
|
+
"default": "./dist/*.js"
|
|
42
|
+
}
|
|
12
43
|
},
|
|
13
|
-
"types": "./lib/index.d.ts",
|
|
14
44
|
"scripts": {
|
|
15
|
-
"test": "node ./test/test.
|
|
16
|
-
"testDeno": "deno run -A ./test/test.
|
|
17
|
-
"
|
|
45
|
+
"test": "node ./test/test.cjs",
|
|
46
|
+
"testDeno": "SI_RUNNER='deno run -A ./test/si.ts' node ./test/test.cjs",
|
|
47
|
+
"testBun": "SI_RUNNER='bun ./test/si.ts' node ./test/test.cjs",
|
|
48
|
+
"ci": "node ./test/ci.cjs",
|
|
49
|
+
"ciDeno": "deno run -A ./test/ci.ts",
|
|
50
|
+
"ciBun": "bun ./test/ci.ts",
|
|
51
|
+
"smoke": "bash ./test/smoke.sh",
|
|
52
|
+
"dev": "tsup src",
|
|
53
|
+
"proto": "tsup ./src/prototest.ts",
|
|
54
|
+
"buildMin": "tsup src/index.ts --dts",
|
|
55
|
+
"build": "tsc",
|
|
56
|
+
"prepublishOnly": "npm run build",
|
|
57
|
+
"watch": "tsup src --watch src",
|
|
58
|
+
"info": "node ./test/info.js",
|
|
59
|
+
"format": "npx @biomejs/biome format --write ./src"
|
|
60
|
+
},
|
|
61
|
+
"tsup": {
|
|
62
|
+
"splitting": false,
|
|
63
|
+
"sourcemap": false,
|
|
64
|
+
"clean": true
|
|
18
65
|
},
|
|
19
66
|
"files": [
|
|
20
|
-
"
|
|
67
|
+
"dist"
|
|
21
68
|
],
|
|
22
69
|
"keywords": [
|
|
23
70
|
"system information",
|
|
@@ -76,11 +123,21 @@
|
|
|
76
123
|
"backend",
|
|
77
124
|
"hardware",
|
|
78
125
|
"BIOS",
|
|
79
|
-
"chassis"
|
|
126
|
+
"chassis",
|
|
127
|
+
"keyboard",
|
|
128
|
+
"mouse",
|
|
129
|
+
"pci",
|
|
130
|
+
"thunderbolt",
|
|
131
|
+
"software",
|
|
132
|
+
"installed software",
|
|
133
|
+
"machine id",
|
|
134
|
+
"unique platform id",
|
|
135
|
+
"node platform id",
|
|
136
|
+
"uuid"
|
|
80
137
|
],
|
|
81
138
|
"repository": {
|
|
82
139
|
"type": "git",
|
|
83
|
-
"url": "
|
|
140
|
+
"url": "https://github.com/sebhildebrandt/systeminformation.git"
|
|
84
141
|
},
|
|
85
142
|
"funding": {
|
|
86
143
|
"type": "Buy me a coffee",
|
|
@@ -97,6 +154,15 @@
|
|
|
97
154
|
"android"
|
|
98
155
|
],
|
|
99
156
|
"engines": {
|
|
100
|
-
"node": ">=
|
|
157
|
+
"node": ">=20.0.0"
|
|
158
|
+
},
|
|
159
|
+
"overrides": {
|
|
160
|
+
"esbuild": "^0.28.1"
|
|
161
|
+
},
|
|
162
|
+
"devDependencies": {
|
|
163
|
+
"@swc/core": "^1.16.1",
|
|
164
|
+
"@types/node": "^25.9.5",
|
|
165
|
+
"tsup": "^8.5.1",
|
|
166
|
+
"typescript": "^6.0.3"
|
|
101
167
|
}
|
|
102
168
|
}
|