Exemplo n.º 1
0
 protected override void ModifyRequest(HttpRequestItem req)
 {
     req.AddData("tuin", _friend.Uin);
     req.AddData("vfwebqq", Session.Vfwebqq);
     req.AddData("t", Timestamp);
     req.Referrer = ApiUrls.ReferrerS;
 }
Exemplo n.º 2
0
 protected override void ModifyRequest(HttpRequestItem req)
 {
     req.AddData("gcode", _group.Code);
     req.AddData("vfwebqq", Session.Vfwebqq);
     req.AddData("t", Timestamp);
     req.Referrer = ApiUrls.ReferrerS;
 }
Exemplo n.º 3
0
 protected override void ModifyRequest(HttpRequestItem req)
 {
     req.AddData("ptwebqq", Session.Ptwebqq);
     req.AddData("clientid", Session.ClientId);
     req.AddData("psessionid", "");
     req.AddData("t", Timestamp);
     req.Referrer = ApiUrls.ReferrerS;
 }
Exemplo n.º 4
0
 protected override void ModifyRequest(HttpRequestItem req)
 {
     req.AddData("clientid", Session.ClientId);
     req.AddData("psessionid", Session.SessionId);
     req.AddData("vfwebqq", Session.Vfwebqq);
     req.AddData("t", Timestamp);
     req.AddData("did", _discussion.Did);
     req.Referrer = ApiUrls.Referrer;
 }
Exemplo n.º 5
0
        protected override HttpRequestItem BuildRequest()
        {
            var req = new HttpRequestItem(HttpMethodType.Post, string.Format(ApiUrls.GetQRCode, Session.Uuid));

            req.AddData("t", "webwx");
            req.AddData("_", (Session.Seq++).ToString());
            req.ResultType = HttpResultType.Byte;
            return(req);
        }
Exemplo n.º 6
0
        protected override void ModifyRequest(HttpRequestItem req)
        {
            var json = new JObject
            {
                { "vfwebqq", Session.Vfwebqq },
                { "hash", QQEncryptor.Hash(Session.User.Uin, Session.Ptwebqq) }
            };

            req.AddData("r", json.ToSimpleString());
            req.Referrer = ApiUrls.Referrer;
        }
Exemplo n.º 7
0
        protected override void ModifyRequest(HttpRequestItem req)
        {
            var json = new JObject
            {
                { "status", QQStatusType.Online.ToString().ToLower() },
                { "ptwebqq", Session.Ptwebqq },
                { "clientid", Session.ClientId },
                { "psessionid", "" }
            };

            req.AddData("r", json.ToSimpleString());
            req.Referrer = ApiUrls.Referrer;
        }
Exemplo n.º 8
0
 protected override void ModifyRequest(HttpRequestItem req)
 {
     req.AddData("appid", AppId);
     req.AddData("e", "0");
     req.AddData("l", "M");
     req.AddData("s", "5");
     req.AddData("d", "72");
     req.AddData("v", "4");
     req.AddData("t", new Random().NextDouble());
     req.ResultType = HttpResultType.Byte;
 }
Exemplo n.º 9
0
        protected override void ModifyRequest(HttpRequestItem req)
        {
            Logger.LogInformation("Begin poll...");

            req.Method = HttpMethodType.Post;
            var json = new JObject
            {
                { "clientid", Session.ClientId },
                { "psessionid", Session.SessionId },
                { "key", "" },
                { "ptwebqq", Session.Ptwebqq }
            };

            req.AddData("r", json.ToSimpleString());
            req.Referrer = "https://d1.web2.qq.com/cfproxy.html?v=20151105001&callback=1";
        }
Exemplo n.º 10
0
        protected override void ModifyRequest(HttpRequestItem req)
        {
            var qrsig = HttpService.GetCookie("qrsig", ApiUrls.CheckQRCode).Value;

            req.AddData("ptqrtoken", QQEncryptor.GetPtqrtoken(qrsig));
            req.AddData("webqq_type", "10");
            req.AddData("remember_uin", "1");
            req.AddData("login2qq", "1");
            req.AddData("aid", "501004106");
            req.AddData("u1", "http://w.qq.com/proxy.html?login2qq=1&webqq_type=10");
            req.AddData("ptredirect", "0");
            req.AddData("ptlang", "2052");
            req.AddData("daid", "164");
            req.AddData("from_ui", "1");
            req.AddData("pttype", "1");
            req.AddData("dumy", "");
            req.AddData("fp", "loginerroralert");
            req.AddData("action", "0-0-10194");
            req.AddData("mibao_css", "m_webqq");
            req.AddData("t", "1");
            req.AddData("g", "1");
            req.AddData("js_type", "0");
            req.AddData("js_ver", JsVer);
            req.AddData("login_sig", "");
            req.AddData("pt_randsalt", "0");
        }
Exemplo n.º 11
0
        protected override HttpRequestItem BuildRequest()
        {
            HttpRequestItem req  = null;
            var             json = new JObject()
            {
                ["content"]    = _msg.PackContentList(),
                ["msg_id"]     = Interlocked.Increment(ref _msgId),
                ["clientid"]   = Session.ClientId,
                ["psessionid"] = Session.SessionId,
            };

            json.Add("face", 252); // 不知道有什么卵用

            switch (_msg)
            {
            case FriendMessage fMsg:
                /*
                 *  {
                 *     "to": 3269846909,
                 *     "content": "[\"嗯\",[\"font\",{\"name\":\"宋体\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]",
                 *     "face": 252,
                 *     "clientid": 53999199,
                 *     "msg_id": 22700002,
                 *     "psessionid": "8368046764001d636f6e6e7365727665725f77656271714031302e3133332e34312e383400001ad00000066b026e040015808a206d0000000a406172314338344a69526d0000002859185d94e66218548d1ecb1a12513c86126b3afb97a3c2955b1070324790733ddb059ab166de6857"
                 * }
                 */
                json.Add("to", fMsg.Friend.Uin);
                req = HttpRequestItem.CreateFormRequest(ApiUrls.SendFriendMsg);
                break;

            case GroupMessage gMsg:
                /*
                 *  {
                 *      "group_uin": 95198668,
                 *      "content": "[\"有人没\",[\"font\",{\"name\":\"宋体\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]",
                 *      "face": 252,
                 *      "clientid": 53999199,
                 *      "msg_id": 22700001,
                 *      "psessionid": "8368046764001d636f6e6e7365727665725f77656271714031302e3133332e34312e383400001ad00000066b026e040015808a206d0000000a406172314338344a69526d0000002859185d94e66218548d1ecb1a12513c86126b3afb97a3c2955b1070324790733ddb059ab166de6857"
                 *  }
                 */
                req = HttpRequestItem.CreateFormRequest(ApiUrls.SendGroupMsg);
                json.Add("group_uin", gMsg.Group.Gid);
                break;

            case DiscussionMessage dMsg:
                /*
                 *  {
                 *      "did": 800220077,
                 *      "content": "[\"asdf\",[\"font\",{\"name\":\"宋体\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]",
                 *      "face": 252,
                 *      "clientid": 53999199,
                 *      "msg_id": 22700003,
                 *      "psessionid": "8368046764001d636f6e6e7365727665725f77656271714031302e3133332e34312e383400001ad00000066b026e040015808a206d0000000a406172314338344a69526d0000002859185d94e66218548d1ecb1a12513c86126b3afb97a3c2955b1070324790733ddb059ab166de6857"
                 *  }
                 */

                req = HttpRequestItem.CreateFormRequest(ApiUrls.SendDiscussionMsg);
                json.Add("did", dMsg.Discussion.Did);
                break;

            default: throw new ArgumentOutOfRangeException(nameof(_msg));
            }
            req.Referrer = "https://d1.web2.qq.com/cfproxy.html?v=20151105001&callback=1";
            req.AddData("r", json.ToJson());
            return(req);
        }
Exemplo n.º 12
0
 protected override void ModifyRequest(HttpRequestItem req)
 {
     req.AddData("t", Timestamp);
     req.Referrer = ApiUrls.Referrer;
 }