Skip to content

Instantly share code, notes, and snippets.

@iwinux
Created November 6, 2011 07:08
Show Gist options
  • Save iwinux/1342582 to your computer and use it in GitHub Desktop.
Save iwinux/1342582 to your computer and use it in GitHub Desktop.
#! /bin/bash
for i in {1..9999}
do
curl http://www.sysulove.com/lovetree/myapp/index.php/Friend/friendPersonalPage/friend_id/$i --cookie "<Paste your browser cookies here>" > $i.html
sleep 0.5
done
@iwinux
Copy link
Author

iwinux commented Nov 7, 2011

我刚刚测试还是可以的。你要用Firebug(或者Chrome Dev Tools)把你用户请求的 cookie copy 下来,贴到 curl 的 --cookie 参数里,这样才能通过用户认证。

@whatisit
Copy link

whatisit commented Nov 7, 2011 via email

@iwinux
Copy link
Author

iwinux commented Nov 7, 2011

这一组 cookie 值用分号隔开,然后用引号包起来,示例:

curl --cookie "rtime=1; ltime=xxxxxxx; cnzz_eid=xxxx; PHPSESSID=xxxxxx; cnzz_a3581173=xxx; sin3581173="

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment