开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 2346|回复: 18
收起左侧

[完成] 若快识别后提交提示验证码不正确

 关闭 [复制链接]
结帖率:100% (2/2)
发表于 2018-12-24 20:31:42 | 显示全部楼层 |阅读模式   海南省海口市
5精币
具体看图,我用凤凰网zc学习,若快识别出了图片码,但是发送失败,按逻辑也就是说,可能在还没识别出来的时候软件就先执行了下一步发送验证码的操作了,为什么会这样,求大佬解答谢谢


补充内容 (2018-12-25 17:57):
找到原因了,不是cookie的问题,原因就是像我猜想的那样,还没打码就已经执行了下一步,所以我把两步合成一步就成了
QQ图片20181224202445.png

最佳答案

查看完整内容

https://id.ifeng.com/user/register 刷新验证码 GET https://id.ifeng.com/public/authcode?_=1545661657624 HTTP/1.1 Host: id.ifeng.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Accept: image/webp,image/apng,image/*,*/*;q=0.8 Referer: https://id.ifeng.com/user/register Accept-Encoding: gzip, d ...
结帖率:0% (0/2)
发表于 2018-12-24 20:31:43 | 显示全部楼层   四川省成都市
https://id.ifeng.com/user/register


刷新验证码
GET https://id.ifeng.com/public/authcode?_=1545661657624 HTTP/1.1
Host: id.ifeng.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Accept: image/webp,image/apng,image/*,*/*;q=0.8
Referer: https://id.ifeng.com/user/register
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: PHPSESSID=1d7e4lmvtc1l2g1iqh38vf35g7


检查手机号是否存在
POST https://id.ifeng.com/api/checkMobile?callback=jQuery18308234497767046651_1545661652527 HTTP/1.1
Host: id.ifeng.com
Connection: keep-alive
Content-Length: 13
Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01
Origin: https://id.ifeng.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://id.ifeng.com/user/register
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: PHPSESSID=1d7e4lmvtc1l2g1iqh38vf35g7

u=手机号

HTTP/1.1 200 OK
Server: ifengweb/1.2.8
Date: Mon, 24 Dec 2018 14:28:11 GMT
Content-Type: text/html
Connection: keep-alive
Vary: Accept-Encoding
Content-Length: 190

(function(){var JsonVarStr___={"code":0,"message":"\u624b\u673a\u53f7\u4e0d\u5b58\u5728","msgcode":"3001","data":{"res":"121"}}; jQuery18308234497767046651_1545661652527(JsonVarStr___);})();

usc2转ansi:        手机号不存在


获取手机验证码

POST https://id.ifeng.com/api/SendMsg?callback=jQuery18308234497767046651_1545661652527 HTTP/1.1
Host: id.ifeng.com
Connection: keep-alive
Content-Length: 28
Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01
Origin: https://id.ifeng.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://id.ifeng.com/user/register
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: PHPSESSID=1d7e4lmvtc1l2g1iqh38vf35g7

auth=plfx&mobile=手机号

返回验证码错误

HTTP/1.1 200 OK
Server: ifengweb/1.2.8
Date: Mon, 24 Dec 2018 14:30:38 GMT
Content-Type: text/html
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 173

(function(){var JsonVarStr___={"code":0,"message":"\u9a8c\u8bc1\u7801\u9519\u8bef","msgcode":"4009","data":""}; jQuery18308234497767046651_1545661652527(JsonVarStr___);})();


发送成功
(function(){var JsonVarStr___={"code":1,"message":"\u64cd\u4f5c\u6210\u529f","msgcode":"0","data":{"ccl":6,"res":"0"}}; jQuery18308234497767046651_1545661652527(JsonVarStr___);})();
区别比较msgcode


注册

POST https://id.ifeng.com/api/MobileRegister?callback=jQuery18308234497767046651_1545661652527 HTTP/1.1
Host: id.ifeng.com
Connection: keep-alive
Content-Length: 48
Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01
Origin: https://id.ifeng.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://id.ifeng.com/user/register
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: PHPSESSID=1d7e4lmvtc1l2g1iqh38vf35g7

u=手机号&k=Abc123456&cb=&cert=058995&type=3

返回

HTTP/1.1 200 OK
Server: ifengweb/1.2.8
Date: Mon, 24 Dec 2018 14:33:41 GMT
Content-Type: text/html
Connection: keep-alive
Vary: Accept-Encoding
Set-Cookie: sid=77FDBB619EF92F9EAC01F2C373CFF7D4; expires=Sun, 13-Dec-2020 14:33:41 GMT; Max-Age=62208000; path=/; domain=.ifeng.com
Set-Cookie: IF_TIME=1545662021065; expires=Sun, 13-Dec-2020 14:33:41 GMT; Max-Age=62208000; path=/; domain=.ifeng.com
Set-Cookie: IF_USER=156%2A%2A%2A%2A2314; expires=Sun, 13-Dec-2020 14:33:41 GMT; Max-Age=62208000; path=/; domain=.ifeng.com
Set-Cookie: IF_REAL=0; expires=Sun, 13-Dec-2020 14:33:41 GMT; Max-Age=62208000; path=/; domain=.ifeng.com
Content-Length: 457

(function(){var JsonVarStr___={"code":1,"message":"\u64cd\u4f5c\u6210\u529f","msgcode":"0","data":{"token":"77FDBB619EF92F9EAC01F2C373CFF7D4","guid":"","res":"0","turl":["http:\/\/id.ifeng.com\/index.php\/callback\/set","http:\/\/weixin.fengjr.com:3000\/setCookies"],"uname":"手机号","month":0,"timestamp":1545662021065,"url":"https:\/\/id.ifeng.com\/user\/regsuccess"}}; jQuery18308234497767046651_1545661652527(JsonVarStr___);})();
回复

使用道具 举报

结帖率:100% (2/2)
 楼主| 发表于 2018-12-24 20:33:20 | 显示全部楼层   海南省海口市
补充一下,我代码写的是全自动zc,不是手动点击发送验证码,zc什么的
回复

使用道具 举报

结帖率:100% (4/4)

签到天数: 16 天

发表于 2018-12-24 20:39:42 | 显示全部楼层   山东省济宁市
不看源码,不知道问题在哪
回复

使用道具 举报

结帖率:60% (3/5)

签到天数: 1 天

发表于 2018-12-24 20:44:34 | 显示全部楼层   江苏省苏州市
验证码不对肯定是cookie的问题。自己看下cookie出错没有
回复

使用道具 举报

结帖率:100% (2/2)
 楼主| 发表于 2018-12-24 20:44:56 | 显示全部楼层   海南省海口市
冷寒冰 发表于 2018-12-24 20:39
不看源码,不知道问题在哪

补充了相应源码图,帮我看看问题在哪谢谢
QQ图片20181224204209.png
QQ图片20181224204217.png
回复

使用道具 举报

结帖率:100% (2/2)
 楼主| 发表于 2018-12-24 20:46:40 | 显示全部楼层   海南省海口市
Dorom666 发表于 2018-12-24 20:44
验证码不对肯定是cookie的问题。自己看下cookie出错没有

cookie不是默认的就好了吗,看一下我补充的图
回复

使用道具 举报

结帖率:60% (3/5)

签到天数: 1 天

发表于 2018-12-24 20:48:32 | 显示全部楼层   江苏省苏州市
你这肯定有问题啊,识别验证码的cookie没有加啊。
回复

使用道具 举报

结帖率:60% (3/5)

签到天数: 1 天

发表于 2018-12-24 20:49:00 | 显示全部楼层   江苏省苏州市
图片=那个  加上cookie
回复

使用道具 举报

结帖率:100% (8/8)

签到天数: 3 天

发表于 2018-12-24 20:54:47 | 显示全部楼层   广东省汕尾市
你可能连cookie到底是啥都还没搞懂
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

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