diff --git a/CHANGELOG.md b/CHANGELOG.md index be4389b..d9737e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.26.1 | 2025-05-22 | `inetChecksite()` fix timeout | | 5.26.0 | 2025-05-21 | `getStatic()` added audio, usb, bluetooth, printer | | 5.25.11 | 2025-01-11 | `docs` updated | | 5.25.10 | 2025-01-10 | `graphics()` improvement Raspberry Ubuntu | diff --git a/docs/history.html b/docs/history.html index a0c8ceb..7b60e93 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.26.1 + 2024-05-22 + inetChecksite() fix timeout + 5.26.0 2024-05-21 diff --git a/docs/index.html b/docs/index.html index c1a51d6..9392952 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.26.0
+ 3
New Version: 5.26.1
@@ -212,7 +212,7 @@
Downloads last month
-
797
+
845
Dependents
diff --git a/lib/graphics.js b/lib/graphics.js index e93d3c5..6833bdc 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -425,7 +425,8 @@ function graphics(callback) { options.stdio = ['pipe', 'pipe', 'ignore']; } try { - const res = execSync(cmd, options).toString(); + const sanitized = util.sanitizeShellString(cmd); + const res = execSync(sanitized, options).toString(); return res; } catch (e) { util.noop(); diff --git a/lib/index.d.ts b/lib/index.d.ts index 74ce82f..0b841dc 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -991,8 +991,11 @@ export function diskLayout(cb?: (data: Systeminformation.DiskLayoutData[]) => an export function networkInterfaceDefault(cb?: (data: string) => any): Promise; export function networkGatewayDefault(cb?: (data: string) => any): Promise; +export function networkInterfaces(): Promise; +export function networkInterfaces(defaultString: 'default'): Promise; +export function networkInterfaces(rescan: boolean): Promise; export function networkInterfaces( - cb?: + cb: | ((data: Systeminformation.NetworkInterfacesData[] | Systeminformation.NetworkInterfacesData) => any) | boolean | string, diff --git a/lib/util.js b/lib/util.js index d1cc412..f90ab17 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2538,7 +2538,7 @@ function checkWebsite(url, timeout = 5000) { }); }) .setTimeout(timeout, () => { - request.close(); + request.destroy(); resolve({ url, statusCode: 408,