Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch 请求不带cookie #5

Open
danielwu182 opened this issue May 23, 2024 · 6 comments
Open

fetch 请求不带cookie #5

danielwu182 opened this issue May 23, 2024 · 6 comments

Comments

@danielwu182
Copy link

No description provided.

@R0A1NG
Copy link
Owner

R0A1NG commented May 23, 2024

No description provided.

网站是什么环境,瑞数的cookie也没带么

@danielwu182
Copy link
Author

No description provided.

网站是什么环境,瑞数的cookie也没带么

自己加的cookie 瑞数的带了

@danielwu182
Copy link
Author

burp repeater里面cookie加个值,但是ws生成的请求没有带那个cookie

@R0A1NG
Copy link
Owner

R0A1NG commented May 23, 2024

burp repeater里面cookie加个值,但是ws生成的请求没有带那个cookie

这个程序是通过浏览器发起请求的,每次请求使用的是网站自带的cookie,在repeater自定义没用
如果要自定义cookie,可以加下document.cookie就能加cookie了,不过一般用不到这个场景

@R0A1NG
Copy link
Owner

R0A1NG commented May 23, 2024

burp repeater里面cookie加个值,但是ws生成的请求没有带那个cookie

mitmdump.py这个位置改下就行
headersArray.forEach(([key, value]) => {
headers[key] = value;
if (key.toLowerCase() === 'cookie'){
let cookiesArray = value.split(', ');
cookiesArray.forEach(cookie1 => {
document.cookie = cookie1;
});
}
});
image

@danielwu182
Copy link
Author

解决了 谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants