现在还能模拟登录微信公众平台吗?在线求解!

jian-xq 2013-12-16 11:21:48
上个月还能模拟登录和主动推送消息的,现在却总返回
{"base_resp":{"ret":-5,"err_msg":"not supported"}}
不知道是不是官网什么调整了。
...全文
5545 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
fangzhen51236 2014-12-24
  • 打赏
  • 举报
回复
weixin.cer在哪弄的?
望远镜Monkey 2014-12-19
  • 打赏
  • 举报
回复
弄了份代码模拟用户登录,总是返回302。现在是不能这么做看吗?
cj252817295 2014-09-15
  • 打赏
  • 举报
回复
你好 你现在这个问题解决了没?
appcxb 2014-08-14
  • 打赏
  • 举报
回复
{"base_resp":{"ret":-5,"err_msg":"not supported"}} 求解决
jeanso 2014-04-23
  • 打赏
  • 举报
回复
wexin.cer 怎么来
  • 打赏
  • 举报
回复
引用 6 楼 laq616853363 的回复:
引用 5 楼 a01589 的回复:
不能了,微信改变了规则,强制用户24小时之内对公众号发信息,公众号才可以主动给用户发消息
那就是说,只有我给你发消息了以后,你才可以广播?
现在是这样的,暂时没有什么解决方法
Csharp_琪 2013-12-30
  • 打赏
  • 举报
回复
引用 5 楼 a01589 的回复:
不能了,微信改变了规则,强制用户24小时之内对公众号发信息,公众号才可以主动给用户发消息
那就是说,只有我给你发消息了以后,你才可以广播?
  • 打赏
  • 举报
回复
不能了,微信改变了规则,强制用户24小时之内对公众号发信息,公众号才可以主动给用户发消息
梦程 2013-12-24
  • 打赏
  • 举报
回复
求解决 有木有 微信公众平台信息列表页面 素材列表页面
梦程 2013-12-23
  • 打赏
  • 举报
回复
{"ret":-5,"err_msg":"not supported"}
中华雪碧 2013-12-16
  • 打赏
  • 举报
回复
这是我以前写的登陆,貌似还可以用



	private static String PWD = "5bd2e46c37c792ce4a9308ab4abes";//密码,要MD5加密

	private static String USERNAME = "130830xxxx@qq.com";

	public static void main(String[] args) throws Exception { // 获得httpclient对象
		HttpClient httpclient = new DefaultHttpClient();

		FileInputStream ins = new FileInputStream(new File("e:/wexin.cer"));//加载微信证书
		CertificateFactory cerFactory = CertificateFactory.getInstance("X.509");
		Certificate cer = cerFactory.generateCertificate(ins);
		KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
		keyStore.load(null, null);
		keyStore.setCertificateEntry("trust", cer);

		SSLSocketFactory socketFactory = new SSLSocketFactory(keyStore);
		Scheme sch = new Scheme("https", socketFactory, 443);

		httpclient.getConnectionManager().getSchemeRegistry().register(sch);

		HttpPost post = new HttpPost("https://mp.weixin.qq.com/cgi-bin/login?lang=zh_CN");
		
		
		Header cookie = new BasicHeader("Cookie", "ac=1,016,001; pt2gguin=o0503530115; RK=wD5qAuCPls; ptcz=2803611a23e59b710519c46b792d8df22cab01e413ca7b38e70465b1d6bc1df0; uin_cookie=1308300842; euin_cookie=70E0A746F5C21CF73A8B45D76B3098B3D71ECF8CF7C1D178; pgv_pvid=7669182920; cert=yAk4mLW8EJ02hefUt3BrpDoZSVPxpYmY");
		Header accept = new BasicHeader("Accept","application/json, text/javascript, */*; q=0.01");
		Header contentType = new BasicHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		Header agent = new BasicHeader("User-Agent","Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)");
		Header referer = new BasicHeader("Referer","https://mp.weixin.qq.com/");
		
		Header[] headers = {cookie,accept,contentType,agent,referer};
		post.setHeaders(headers);

		List<NameValuePair> nvps = new ArrayList<NameValuePair>();
		nvps.add(new BasicNameValuePair("username", USERNAME));
		nvps.add(new BasicNameValuePair("pwd", PWD));
		nvps.add(new BasicNameValuePair("f", "json"));
		nvps.add(new BasicNameValuePair("imgcode", ""));
		post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));

		// 发送请求
		HttpResponse response = httpclient.execute(post);
		// 输出返回值
		java.io.InputStream is = response.getEntity().getContent();
		BufferedReader br = new BufferedReader(new InputStreamReader(is));
		printAll(br);
		br.close();
		
		HttpGet get = new HttpGet("https://mp.weixin.qq.com/cgi-bin/contactmanage?t=user/index&token=705999888&lang=zh_CN&pagesize=10&pageidx=0&type=0&groupid=0");
		response = httpclient.execute(get);
		// 输出返回值
		is = response.getEntity().getContent();
		br = new BufferedReader(new InputStreamReader(is,"UTF-8"));
		printAll(br);
		br.close();
		
		
	}

	private static void printAll(BufferedReader br) throws IOException {
		String line = "";
		while ((line = br.readLine()) != null) {
			System.out.println(line);
		}
	}

	/**
	 * 使用 POST 方式提交数据
	 * 
	 * @return
	 * @throws URIException
	 */
	private static HttpPost getPostMethod() {
		return null;

	}



登陆返回
{
"Ret": 302,
"ErrMsg": "/cgi-bin/home?t=home/index&lang=zh_CN&token=431037653",
"ShowVerifyCode": 0,
"ErrCode": 0
}
致知Fighting 2013-12-16
  • 打赏
  • 举报
回复
引用 楼主 wangbaobao158356 的回复:
上个月还能模拟登录和主动推送消息的,现在却总返回 {"base_resp":{"ret":-5,"err_msg":"not supported"}} 不知道是不是官网什么调整了。
not supported,应该是加入了安全检测机制把你这种给屏蔽掉了

50,531

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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