Skip to content

Instantly share code, notes, and snippets.

@suanmiao
Last active August 29, 2015 13:56
Show Gist options
  • Save suanmiao/9031056 to your computer and use it in GitHub Desktop.
Save suanmiao/9031056 to your computer and use it in GitHub Desktop.

#WeChat Hack

=======================

##1.Search

###Normal:

####Url:

https://mp.weixin.qq.com/cgi-bin/message

####Params:

t=message/list &action= &keyword= &count=20 &day=7 &filterivrmsg=0 &token=645703560 &lang=zh_CN

###Search:

####Url:

https://mp.weixin.qq.com/cgi-bin/message

####Params:

t=message/list &action=search &keyword=this &count=20 &token=645703560 &lang=zh_CN

##2.Get appMessage

###2.1 Get image material:

####(type=2)

####Url:

https://mp.weixin.qq.com/cgi-bin/filepage? token=1616820906 &lang=zh_CN &random=0.37681192758509574 &f=json &ajax=1 &type=2 &begin=0 &count=10

####Referer:

https://mp.weixin.qq.com/cgi-bin/singlesendpage?tofakeid=355421075&t=message/send&action=index&token=1616820906&lang=zh_CN

###2.2 Get image material page

####(only the begin is different)

####Url:

https://mp.weixin.qq.com/cgi-bin/filepage? token=1616820906 &lang=zh_CN &random=0.793019624557453 &f=json &ajax=1 &type=2 &begin=10 &count=10

####Response:

{"base_resp":{"ret":0,"err_msg":"ok"},"page_info":{"type":2,"file_cnt":{"total":51,"img_cnt":39,"voice_cnt":2,"video_cnt":0,"app_msg_cnt":10,"commondity_msg_cnt":0,"video_msg_cnt":0},"file_item":[{"file_id":200009210,"name":"2014-02-06 21:16:26的屏幕截图.png","type":2,"size":"55.0\tK","update_time":1391949343,"play_length":0},{"file_id":200009208,"name":"2014-02-06 21:16:26的屏幕截图.png","type":2,"size":"55.0\tK","update_time":1391949299,"play_length":0},{"file_id":200009060,"name":"9993fbeajw1e2oizz0ftdj.jpg","type":2,"size":"107.7\tK","update_time":1391871253,"play_length":0},{"file_id":200009059,"name":"9993fbeajw1e2oizz0ftdj.jpg","type":2,"size":"107.7\tK","update_time":1391871225,"play_length":0},{"file_id":200009058,"name":"DeepinScreenshot20140105223444.png","type":2,"size":"22.2\tK","update_time":1391870989,"play_length":0},{"file_id":200009048,"name":"9993fbeajw1e2oizz0ftdj.jpg","type":2,"size":"107.7\tK","update_time":1391867587,"play_length":0},{"file_id":200009028,"name":"6eb1dcc1jw1e2sost77ojj.jpg","type":2,"size":"23.3\tK","update_time":1391863009,"play_length":0},{"file_id":200009027,"name":"6eb1dcc1jw1e2sost77ojj.jpg","type":2,"size":"23.3\tK","update_time":1391862987,"play_length":0},{"file_id":200009026,"name":"446b9542784911e2ab6822000a1fb191_7.jpg","type":2,"size":"123.6\tK","update_time":1391862923,"play_length":0},{"file_id":200009023,"name":"9993fbeajw1e2oizz0ftdj.jpg","type":2,"size":"107.7\tK","update_time":1391861788,"play_length":0}]}}

###2.3 Get image content

####Url:

https://mp.weixin.qq.com/cgi-bin/getimgdata? token=1616820906 &msgid={msgid} &mode=small &source=file &fileId=200009247 &ow=-1

####Referer:

https://mp.weixin.qq.com/cgi-bin/singlesendpage?tofakeid=355421075&t=message/send&action=index&token=1616820906&lang=zh_CN

###2.4 Get voice material list ####(type = 3) ####Url:

https://mp.weixin.qq.com/cgi-bin/filepage? token=1616820906 &lang=zh_CN &random=0.9427481011350107 &f=json &ajax=1 &type=3 &begin=0 &count=10

####Referer:

https://mp.weixin.qq.com/cgi-bin/singlesendpage?tofakeid=355421075&t=message/send&action=index&token=1616820906&lang=zh_CN

####Response:

{"base_resp":{"ret":0,"err_msg":"ok"},"page_info":{"type":3,"file_cnt":{"total":51,"img_cnt":39,"voice_cnt":2,"video_cnt":0,"app_msg_cnt":10,"commondity_msg_cnt":0,"video_msg_cnt":0},"file_item":[{"file_id":100009278,"name":"Redbot_tpai_20140101_161611.mp3","type":3,"size":"8.3\tK","update_time":1388736226,"play_length":5000},{"file_id":10000000,"name":"无标题.wma","type":3,"size":"4.8\tK","update_time":1358436172,"play_length":3000}]}}

###2.4 Get app material

####Url:

https://mp.weixin.qq.com/cgi-bin/appmsg? token=1616820906 &lang=zh_CN &random=0.04462217174617156 &f=json &ajax=1 &type=10 &action=list &begin=0 &count=10

##3.Send Message

###3.1 Send image message

####Url: (Post) https://mp.weixin.qq.com/cgi-bin/singlesend

####Params:

ajax 1 f json file_id 200009247 fileid 200009247 imgcode lang zh_CN random 0.5403923340859014 t ajax-response tofakeid 355421075 token 1616820906 type 2

####Response:

{"base_resp":{"ret":0,"err_msg":"ok"}}

###3.2 Send voice message

####Url:

https://mp.weixin.qq.com/cgi-bin/singlesend

####Params:

ajax 1 f json file_id 100009278 fileid 100009278 imgcode lang zh_CN random 0.22012312199463635 t ajax-response tofakeid 355421075 token 1616820906 type 3

####Response:

{"base_resp":{"ret":0,"err_msg":"ok"}}

=========================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment