如何复制从Chrome中的cookie? [英] How do I copy cookies from Chrome?

查看:3092
本文介绍了如何复制从Chrome中的cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用bash来张贴到一个网站,需要我第一记录。所以,我需要发送与登录cookie的请求。于是,我就登录并保持饼干,但因为该网站使用JavaScript来散列一个非常奇怪的时尚密码,这是行不通的,所以不是我要去只是把我的登录的Cookie从浏览器的网站。如何从Chrome中得到饼干和格式化它们卷曲?

我试图做到这一点:

卷曲--request POST -dA = X和b = Y-b什么?到这里 site.com/a.php


解决方案

  1. 命中F12打开开发者控制台。

  2. 看看网络选项卡。

  3. 请任何你需要在网站上触发你感兴趣的动作

  4. 右键单击相关要求,并选择复制为卷曲

这会给你你触发的动作curl命令,完全填充了饼干和所有。当然可以也标志拷贝作为新的卷曲的命令的基础。

I am using bash to to POST to a website that requires that I be logged in first. So I need to send the request with login cookie. So I tried logging in and keeping the cookies, but it doesn't work because the site uses javascript to hash the password in a really weird fashion, so instead I'm going to just take my login cookies for the site from Chrome. How do get the cookies from Chrome and format them for Curl?

I'm trying to do this:

curl --request POST -d "a=X&b=Y" -b "what goes here?" "site.com/a.php"

解决方案

  1. Hit F12 to open the developer console.
  2. Look at the Network tab.
  3. Do whatever you need to on the web site to trigger the action you're interested in
  4. Right click the relevant request, and select "Copy as cURL"

This will give you the curl command for the action you triggered, fully populated with cookies and all. You can of course also copy the flags as a basis for new curl commands.

这篇关于如何复制从Chrome中的cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆