V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lookingtheworld
V2EX  ›  Java

curl 读取 cookie 并进行测试

  •  
  •   lookingtheworld · 2016-06-07 19:58:40 +08:00 · 2727 次点击
    这是一个创建于 2887 天前的主题,其中的信息可能已经有所发展或是发生改变。

    1 、首先登陆网站,采用 firebug 获得 cookie ,然后导出所有的 cookie

    2 、查看导出的 cookie 文件格式为: 刚好这个文件格式 与 curl 的格式非常匹配。

    3 、执行 curl 命令:

    for i in $(seq 1000);do curl -b cookie "http://your_site/console-network-api/?Service=kec&Action=DescribeInstances&Version=2016-03-04&Region=cn-shanghai-3&Marker=1&MaxResults=100"; done

    3 条回复    2016-06-12 13:48:53 +08:00
    SoloCompany
        1
    SoloCompany  
       2016-06-07 23:29:21 +08:00
    居然没用过 chrome?
    dixyes
        2
    dixyes  
       2016-06-07 23:35:57 +08:00 via Android   ❤️ 1
    其实吧 你在 ff 的 web 控制台 网络选项卡 里面对任意一个网络请求右键 有个选项叫 “复制为 curl ” 然后粘贴就能用
    lookingtheworld
        3
    lookingtheworld  
    OP
       2016-06-12 13:48:53 +08:00
    @dixyes 赞。感谢指导!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2303 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 05:22 · PVG 13:22 · LAX 22:22 · JFK 01:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.