Example #1
0
        public static BindQQRequest CreateBindMobileRequestEntity(string sessionKey, uint uin, string deviceID, string OSType, string qq, string pass, string deviceName, string deviceType)
        {
            BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            BindQQRequest.Builder lrb = new BindQQRequest.Builder();
            lrb.SetBase(br);
            lrb.SetQQ((uint)long.Parse(qq));
            string strMD5Pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pass, "MD5").ToLower();

            lrb.SetPwd(strMD5Pwd);
            lrb.SetPwd2(strMD5Pwd);
            lrb.SetImgSid("");
            lrb.SetImgCode("");
            lrb.SetOPCode(1);
            lrb.SetImgEncryptKey(new SKBuiltinString_t.Builder().SetString(""));
            SKBuiltinBuffer_t.Builder skb = new SKBuiltinBuffer_t.Builder();
            skb.SetILen(0);
            skb.SetBuffer(ByteString.CopyFrom(new byte[0]));

            lrb.SetKSid(skb);
            lrb.SetSafeDeviceName(deviceName);
            lrb.SetSafeDeviceType(deviceType);

            return(lrb.Build());
        }
Example #2
0
        public static BindQQRequest CreateBindMobileRequestEntity(string sessionKey, uint uin, string deviceID, string OSType, string qq, string pass, string deviceName, string deviceType)
        {
            BaseRequest @base = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            BindQQRequest.Builder builder = new BindQQRequest.Builder();
            builder.SetBase(@base);
            builder.SetQQ((uint)long.Parse(qq));
            string text = FormsAuthentication.HashPasswordForStoringInConfigFile(pass, "MD5").ToLower();

            builder.SetPwd(text);
            builder.SetPwd2(text);
            builder.SetImgSid("");
            builder.SetImgCode("");
            builder.SetOPCode(1);
            builder.SetImgEncryptKey(new SKBuiltinString_t.Builder().SetString(""));
            SKBuiltinBuffer_t.Builder builder2 = new SKBuiltinBuffer_t.Builder();
            builder2.SetILen(0);
            builder2.SetBuffer(ByteString.CopyFrom(new byte[0]));
            builder.SetKSid(builder2);
            builder.SetSafeDeviceName(deviceName);
            builder.SetSafeDeviceType(deviceType);
            return(builder.Build());
        }