有验证码的模拟登录获取数据信息
有一个网站,想获取它的数据信息,但需要登录才可以获取到。他们有图片验证码,我现在能否在我这里远程调用他的图片验证码url,手动录入这个验证码,来实现模拟登录获取数据信息的?我目前测试的好像总是提示验证码不正确,不清楚怎么回事?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有一个网站,想获取它的数据信息,但需要登录才可以获取到。他们有图片验证码,我现在能否在我这里远程调用他的图片验证码url,手动录入这个验证码,来实现模拟登录获取数据信息的?我目前测试的好像总是提示验证码不正确,不清楚怎么回事?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
可以:
1、访问图片的URL,获取 第一次的cookie1,下载图片,识别图片 str。
2、使用 上一次的 cookie1 和 str 加你的用户名和密码等.... 登陆,获取 cookie2
3、访问带上cookie2
在获取验证码时不但要把验证码下载下来,还需要保存当时的参数(百度登录里面是token)和cookie,然后在收入验证码后把验证码和上一次的cookie+参数再加到post参数里面,就OK了,这样验证码就不会变
我用代码说话吧:
语言:Java
第三方jar:httpclient-4.2.1