曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 4029|回复: 0
打印 上一主题 下一主题

curl for phpwind8.x login and reply

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34397
跳转到指定楼层
楼主
发表于 2011-4-21 10:09:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Use curl to login phpwind8.x



Step-1,Get the cookies
[beyes@SLinux phpwind]$ curl -A "Mozilla/4.0" -D bbscookie.txt -o login.html "http://www.xxxxx.cn/login.php?action=login"


Step-2,Save the new cookies (the website may redirect to index.php and it will use the new cookies)
[beyes@SLinux phpwind]$ curl -A "Mozilla/4.0" -d "forward=&jumpurl=http://www.xxxxxx.cn/index.php&step=2&lgt=0&pwuser=beyes&pwpwd=xxxxxx&question=0&customquest=&answer=&hideid=0&cktime=31536000&sumbit=登录" -b bbscookie.txt -o login2.htm -D bbscookie2.txt "http://www.xxxxxx.cn/login.php?action=login"


Step-3,use the cookies saved in Step-4 to visit website :
[beyes@SLinux phpwind]$ curl -A "Mozilla/4.0" -b bbscookie2.txt -o view.html http://www.xxxxxx.cn/read.php?tid=4651



OK, if you want to login phpwind8.x gbk edition, you should change the "登录" to gb2312 code "%B5%C7%C2%BC" .

Now,we can reply to a "post" 。See below:
[beyes@SLinux phpwind]$ curl -A "Mozilla/4.0" -d "atc_usesign=1&replytouser=&atc_convert=1&atc_autourl=1&step=2&type=ajax_addfloor&fid=41&cyid=&tid=3419&stylepath=wind&ajax=1&verity=c1804cdf&_hexie=cn0zz&iscontinue=0&atc_title=Re:Test_Post&atc_content=replay_from_curl&action=reply" -b bbscookie2.txt -o posted.htm "http://www.xxxx.net/bbs/post.php?fid=41&nowtime=`date +%s`&verify=c1804cdf"

Note, the post url's format is
http://www.xxxx.com/post?fid=[fid_number]&nowtime=[your machine time]&verify=[value of verify]
use "date +%s" for getting your machine time and you can download the the "post" html first and pickup a unique "verify" value .

Engilsh is difficult to learn and write , poor...!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2025-6-17 23:13 , Processed in 0.082523 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表