Esempio n. 1
0
        private PickUpQQDoResponse QueryTecentQQData(string cookie)
        {
            //从cookie中获取skey
            RequestHeaderHelper         request = new RequestHeaderHelper();
            Dictionary <string, string> req     = request.PickUpRequestHeader(findQQAcountRequestHeader);
            string key = request.SplitCookie(cookie)["skey"];
            //key = "@66i3M9kYA";//799103928
            int n = 5381;//这一步生成腾讯需要的key
            int cal;

            for (int r = 0, i = key.Length; r < i; ++r)
            {
                char ch    = (char)key.Substring(r, 1)[0];
                int  acsii = (int)ch;
                n += (n << 5) + acsii;
            }
            QueryQQParam param = new QueryQQParam();

            if (QueryParam != null)
            {
                param = QueryParam;
            }
            param.ldw = (n & 2147483647);
            object obj = ForeachFindQQ(param, cookie);

            System.Threading.Thread th = new Thread(new ThreadStart(delegate() {
                if (callback != null)
                {
                    callback(obj);
                }
            }));
            th.Start();
            return((PickUpQQDoResponse)obj);
        }
Esempio n. 2
0
        public static Dictionary <string, string> PrepareHeader()
        {
            string head = @":authority:mail.qq.com
:method:GET
:path:/cgi-bin/laddr_lastlist?sid=eFdapxlCqMOMcnsi&encode_type=js&t=addr_datanew&s=AutoComplete&category=hot&resp_charset=UTF8&ef=js&r=0.6020991376261546
:scheme:https
accept:*/*
accept-encoding:gzip, deflate, sdch, br
accept-language:zh-CN,zh;q=0.8
cookie:pgv_pvi=2166054912; RK=5Q8eAGcqdH; tvfe_boss_uuid=4326f9f3a442deb4; o_cookie=158055983; pac_uid=1_158055983; pgv_pvid=3887722460; pgv_si=s6359198720; ptisp=; ptui_loginuin=158055983; ptcz=50381d247d471856795f71bee19f08d2d437f1a1e9ecc4a4d47d90b0744a7ddf; pt2gguin=o0158055983; uin=o0158055983; skey=@1nPjzuiwV; p_uin=o0158055983; p_skey=kTWhcsqmG7KkzjFgyTDc1yZlwAHfQJCzQQpCbcJu0LE_; pt4_token=6XS7kVOMTUszVxbyGpfdjG44YzKdwdnQAFq*LMPfU-c_; wimrefreshrun=0&; qm_antisky=158055983&80dbb4d659204186ce41890411ffba0886f869abe61d68f4c9ef88d9f6eec103; qm_flag=0; [email protected]; sid=158055983&6c2ac2e2e9421186966c28e02248ffb3,qa1RXaGNzcW1HN0trempGZ3lURGMxeVpsd0FIZlFKQ3pRUXBDYmNKdTBMRV8.; qm_username=158055983; qm_domain=https://mail.qq.com; qm_ptsk=158055983&@1nPjzuiwV; foxacc=158055983&0; ssl_edition=sail.qq.com; edition=mail.qq.com; qm_loginfrom=158055983&wpt; username=158055983&158055983; CCSHOW=000001; new_mail_num=158055983&142; webp=1
referer:https://mail.qq.com/zh_CN/htmledition/ajax_proxy.html?mail.qq.com&v=140521
user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36";
            Dictionary <string, string> requestHead = new RequestHeaderHelper().PickUpRequestHeader(head);
            Dictionary <string, string> heads       = HttpClientHelper.RequestHeaderHelper.InitHeader(head);

            return(heads);
        }
Esempio n. 3
0
        public string QQGroupGather(string cookie, UinGroupDataRequestParam param)
        {//共同的cookie项: pgv_pvi, pgv_pvid,pgv_si ,RK,uin,o_cookie,ptui_loginuin,ptisp,pt2gguin,uin,skey,itkn
            //缺少项:
            // 可去除项:
            string recommandurl              = "http://qun.qq.com/cgi-bin/qunapp/recommend2";//这是推荐的qq群
            string url                       = "http://qun.qq.com/cgi-bin/group_search/pc_group_search";
            string requestHeader             = @"Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate
Accept-Language:zh-CN,zh;q=0.8
Connection:keep-alive
Content-Length:74
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:{Cookie}
Host:qun.qq.com
Origin:http://find.qq.com
Referer:http://find.qq.com/index.html?version=1&im_version=5521&width=910&height=610&search_target=0
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36";
            Dictionary <string, string> head = new Dictionary <string, string>();
            string ck = "{Cookie}";
            Dictionary <string, string> hs = new RequestHeaderHelper().PickUpRequestHeader(requestHeader);

            foreach (KeyValuePair <string, string> item in head)
            {
                if (item.Value == ck)
                {
                    head[item.Key] = cookie;
                    break;
                }
            }

            string generate = @"Request URL:http://qun.qq.com/cgi-bin/qunapp/recommend2
Request Method:POST
Status Code:200 OK
Remote Address:182.254.104.46:80
Referrer Policy:no-referrer-when-downgrade";
            string form     = @"k:交友
n:8
st:1
iso:1
src:1
v:4903
bkn:1053723692
isRecommend:false
city_id:10059
from:1
newSearch:true
keyword:白羊座
sort:0
wantnum:24
page:0
ldw:1053723692";

            //cookie:tvfe_boss_uuid=1e6199e1d2117b2e; pgv_pvi=2689650688; RK=jY8eVEcaan; luin=o0158055983; lskey=0001000072112c965a16959759ae4ea12f3723377b617431ab54af275b17458151ca356e5e7c02ddf05d2898; o_cookie=158055983; pgv_pvid=280615424; pgv_si=s1233967104; ptui_loginuin=1281756329; ptisp=cnc; ptcz=a13b68ec1bc3d52e50539dce656d1c5dddd67990597a5f892944921a0910ae37; pt2gguin=o1281756329; uin=o1281756329; skey=@JcISofHYC
            requestHeader = requestHeader.Replace(ck, cookie);
            param.CalculateUinJsParam(cookie);
            string ps     = param.ConvertJson();
            string result = HttpClientExtend.HttpWebRequestPost(url, ps, cookie);
            string path   = GeneratePathTimeSpan(cookie);

            LoggerWriter.CreateLogFile(result, path, ELogType.SpliderGroupDataLog);
            return(result);
        }