C # WebQQ protocol group robot (3)

Source: Internet
Author: User

C # WebQQ protocol group robot (3)

 

 

Sometimes you need to add some functions by yourself. Here is a method.

When debugging webqq robots, I used google's F12 developer tool to capture network packets. Most of webqq's GET request parameters were used to GET the values obtained through Login2.

This method is used to obtain the user's real QQ. It seems useless. These are obtained by analyzing its network request.

Public string GetFriendQQ (string tuin) {string url = http://s.web2.qq.com/api/get_friend_uin2? Tuin = {$ tuin} & verifysession = & type = 1 & code = & vfwebqq = {$ vfwebqq} & t = 1409915278768; url = url. replace ({$ tuin}, tuin); url = url. replace ({$ tuin}, this. vfwebqq); HttpItem item = new HttpItem () {URL = url, Encoding = System. text. encoding. getEncoding (UTF-8), Method = get, IsToLower = false, Timeout = 100000, ReadWriteTimeout = 30000, Host = HOST [1], Referer = REFERER [1], userAgent = Mozilla/5.0 (Windows NT 6. 1; WOW64; rv: 18.0) Gecko/20100101 Firefox/18.0, // your browser type, version, the default value of the Operating System option is ContentType = application/x-www-form-urlencoded and ResultType = ResultType. string ,}; HttpResult result = http. getHtml (item); JObject ret = (JObject) JsonConvert. deserializeObject (result. html); if (! CheckResult (ret) {OnGetDataError (new RobotEventArgs (An error occurred while obtaining data during GetFriendQQ); return null;} JObject retjson = (JObject) ret [result]; string qq = retjson [account]. toString (); if (friendlist. containsKey (tuin) friendlist [tuin]. qq = qq; return qq ;}


So what functions do you need to add? You can directly debug the two. If anyone needs this project, they can give it to you, but they are paid.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.