| 69 | })() |
| 70 | |
| 71 | function GetCookie() { |
| 72 | if ($request.body.includes("------WebKitForm")) { |
| 73 | const cookie = typeof $request.headers["Cookie"]=='undefined' ? $request.headers["cookie"] : $request.headers["Cookie"]; |
| 74 | const contentType = typeof $request.headers["Content-Type"]=='undefined' ? $request.headers["content-type"] : $request.headers["Content-Type"]; |
| 75 | const userAgent = typeof $request.headers["User-Agent"]=='undefined' ? $request.headers["user-agent"] : $request.headers["User-Agent"]; |
| 76 | const body = $request.body; |
| 77 | var obj = FormDataToObject(body, contentType); |
| 78 | if (obj["__lib"] === "mission" && obj["__act"] === "get_default") { |
| 79 | console.log("- 正在获取cookie,请稍后"); |
| 80 | $.setdata(cookie, name + "_cookie"); |
| 81 | $.setdata(contentType, name + "_contentType"); |
| 82 | $.setdata(userAgent, name + "_userAgent"); |
| 83 | var obj = FormDataToObject(body, contentType); |
| 84 | $.setdata(JSON.stringify(obj), name + "_body"); |
| 85 | $.content = `获取cookie: 成功! `; |
| 86 | $.msg(name, "", $.content); |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | async function signNGA(){ |
| 92 | config.cookie = $.getdata(name + "_cookie"); |