微信公众平台模拟登陆 怎么破*(求大神帮忙)

Fighter168 2013-11-18 10:43:21
之前有写过微信公众平台的模拟登陆,但是那是几个月之前的事了,现在的话微信公众平台加强了安全性保护,防抓包,登陆密码md5加密,之前写的模拟登陆程序抓粉丝量的便不可用了

求大神指教,如何破,实现微信公众平台的模拟登陆,抓到公众号的粉丝量
...全文
414 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Fighter168 2013-11-19
  • 打赏
  • 举报
回复
引用 4 楼 bartonyangcs 的回复:
用httpUnit模拟登陆,直接上代码 public static void main(String[] args) { WebClient webClient = new WebClient(); webClient.setJavaScriptEnabled(false); String url = "https://mp.weixin.qq.com/cgi-bin/login?lang=zh_CN"; WebRequest webRequest=null; try { webRequest=new WebRequest(new URL(url)); //设置post webRequest.setHttpMethod(HttpMethod.POST); Map<String, String> additionalHeaders=new HashedMap(); additionalHeaders.put("Accept", "application/json, text/javascript, */*; q=0.01"); additionalHeaders.put("Accept-Encoding", "gzip, deflate"); additionalHeaders.put("Accept-Language", "zh-cn"); additionalHeaders.put("Cache-Control", "no-cache"); additionalHeaders.put("Connection", "Keep-Alive"); additionalHeaders.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); additionalHeaders.put("Host", "mp.weixin.qq.com"); additionalHeaders.put("Referer", "https://mp.weixin.qq.com/"); additionalHeaders.put("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"); additionalHeaders.put("X-Requested-With", "XMLHttpRequest"); webRequest.setAdditionalHeaders(additionalHeaders); // 设置请求体参数 String params = "f=json&imagecode=&pwd="+MD5Utils.md5("xxx")+"&username=xxx"; webRequest.setRequestBody(params); WebResponse webResponse = webClient.loadWebResponse(webRequest); String contentAsString = webResponse.getContentAsString(); System.out.println(contentAsString); Gson gson=new Gson(); ReturnVo returnVo=gson.fromJson(contentAsString, ReturnVo.class); if("302".equals(returnVo.getRet())){ WebClient webClient2 = new WebClient(); webClient2.setJavaScriptEnabled(false); String url2 = "https://mp.weixin.qq.com"+returnVo.getErrMsg(); // 建立连接,下载网页 HtmlPage htmlPage = (HtmlPage) webClient.getPage(url2); System.out.println(htmlPage.asXml().toString()); } } catch (Exception e) { e.printStackTrace(); } 具体流程可以私聊...可实现模拟登陆,前提是要先绕过SSL
膜拜大神。。。。
小羊_Shaun 2013-11-19
  • 打赏
  • 举报
回复
用httpUnit模拟登陆,直接上代码 public static void main(String[] args) { WebClient webClient = new WebClient(); webClient.setJavaScriptEnabled(false); String url = "https://mp.weixin.qq.com/cgi-bin/login?lang=zh_CN"; WebRequest webRequest=null; try { webRequest=new WebRequest(new URL(url)); //设置post webRequest.setHttpMethod(HttpMethod.POST); Map<String, String> additionalHeaders=new HashedMap(); additionalHeaders.put("Accept", "application/json, text/javascript, */*; q=0.01"); additionalHeaders.put("Accept-Encoding", "gzip, deflate"); additionalHeaders.put("Accept-Language", "zh-cn"); additionalHeaders.put("Cache-Control", "no-cache"); additionalHeaders.put("Connection", "Keep-Alive"); additionalHeaders.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); additionalHeaders.put("Host", "mp.weixin.qq.com"); additionalHeaders.put("Referer", "https://mp.weixin.qq.com/"); additionalHeaders.put("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"); additionalHeaders.put("X-Requested-With", "XMLHttpRequest"); webRequest.setAdditionalHeaders(additionalHeaders); // 设置请求体参数 String params = "f=json&imagecode=&pwd="+MD5Utils.md5("xxx")+"&username=xxx"; webRequest.setRequestBody(params); WebResponse webResponse = webClient.loadWebResponse(webRequest); String contentAsString = webResponse.getContentAsString(); System.out.println(contentAsString); Gson gson=new Gson(); ReturnVo returnVo=gson.fromJson(contentAsString, ReturnVo.class); if("302".equals(returnVo.getRet())){ WebClient webClient2 = new WebClient(); webClient2.setJavaScriptEnabled(false); String url2 = "https://mp.weixin.qq.com"+returnVo.getErrMsg(); // 建立连接,下载网页 HtmlPage htmlPage = (HtmlPage) webClient.getPage(url2); System.out.println(htmlPage.asXml().toString()); } } catch (Exception e) { e.printStackTrace(); } 具体流程可以私聊...可实现模拟登陆,前提是要先绕过SSL
teemai 2013-11-18
  • 打赏
  • 举报
回复
只好分析了,在你之前的基础上改。 另外道高一尺魔高一丈。有攻就有防,最终没办法那也就没办法了。
Fighter168 2013-11-18
  • 打赏
  • 举报
回复
引用 2 楼 defonds 的回复:
md5 也不是不能破解的。之前微信没有侧重安全这一块,现在加上了。不是说这些东西破解不了,但要看你破解需要的代价
MD5 的话已经可以破出来,有关键是如何取得他的cookie(他会返回三个set-cookie)然后使用哪个cookie 去继续访问 吧头信息都设置上去,但是它总是返回json 的内容是表明是错误消息。如何获取我想要的cookie。 使用哪个cookie去继续访问
Defonds 2013-11-18
  • 打赏
  • 举报
回复
md5 也不是不能破解的。之前微信没有侧重安全这一块,现在加上了。不是说这些东西破解不了,但要看你破解需要的代价

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧