Exemple #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     cookieStr         = "";
     userinfo          = null;
     myCookieContainer = null;
     userid            = "";
     sSDID             = "";
     gtk = "";
     comboBox1.Items.Clear();
     label1.Text = "未登录";
     webBrowser1.Navigate("http://ui.ptlogin2.qq.com/cgi-bin/login?appid=8000201&s_url=http%3A%2F%2Fimgcache.qq.com%2Fqv%2Ffile%2Fqq%2Flogin.loginProxy_1.x.x.html");
     groupBox1.Visible = false;
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (cookieStr == "")
            {
                MessageBox.Show("请先登录!!!");
                return;
            }


            string aa = http_GET("http://iyouxi.vip.qq.com/ams3.0.php?_c=queryRoleInfo&gamename=dnf&area=" + area + "&g_tk=" + gtk, myCookieContainer);

            //string aa = "json14848016790871({\"ret\":0,\"data\":[{\"role_id\":\"16705750\",\"nick\":\"Asura\\u4e36\\u4e44\"},{\"role_id\":\"17521661\",\"nick\":\"\\u9694\\u58c1[\\u738b\\u5927\\u67aa]\"},{\"role_id\":\"26980759\",\"nick\":\"\\u5929\\u9009\\u4e44\\u7f14\\u9020\"},{\"role_id\":\"28160539\",\"nick\":\"\\u6218\\u6597\\u5723\\u7075\"},{\"role_id\":\"28460688\",\"nick\":\"\\u529b\\u5c48\\u5929\\u4e0b\"},{\"role_id\":\"28549736\",\"nick\":\"\\u6613\\u6b66\\u8bed\"},{\"role_id\":\"28604163\",\"nick\":\"\\u4e73\\u6c41\\u306e\\u9a91\\u58eb\"},{\"role_id\":\"28894325\",\"nick\":\"\\u6c14\\u4e44\\u6b7b\\u4f60\"},{\"role_id\":\"29047949\",\"nick\":\"\\u8d64\\u4e36\\u72ac\"},{\"role_id\":\"29165134\",\"nick\":\"+38\\u7684[\\u51ef\\u4e3d]\"},{\"role_id\":\"29799370\",\"nick\":\"\\u540e\\u8857\\u516c\\u4e3b\"},{\"role_id\":\"30117053\",\"nick\":\"\\u5723\\u804c\\u8005\\u662f\\u6211\"},{\"role_id\":\"30117056\",\"nick\":\"\\u5723\\u804c\\u8005\\u771f\\u662f\\u6211\"},{\"role_id\":\"30119531\",\"nick\":\"\\u6211\\u771f\\u662f\\u5723\\u804c\\u8005\"},{\"role_id\":\"30166714\",\"nick\":\"\\u7b2c\\u4e94\\u5251\\u5723\\u00b7\\u7edd\"},{\"role_id\":\"30173360\",\"nick\":\"\\u4f26\\u5bb6\\u4e5f\\u80fd\\u5c04\"},{\"role_id\":\"30305005\",\"nick\":\"\\u9020\\u7891\\u8005\\u00b7\\u5239\"},{\"role_id\":\"30307230\",\"nick\":\"\\u6211\\u662f\\u9ed1\\u6b66\"},{\"role_id\":\"30436728\",\"nick\":\"\\u9b54\\u4e44\\u9053\"},{\"role_id\":\"30843469\",\"nick\":\"\\u72d7\\u6b87\\u786a\\u4f60\\u4e0d\\u914d\"},{\"role_id\":\"31209434\",\"nick\":\"\\u821e\\u6c14\\u5927\\u6e7f\"},{\"role_id\":\"31283367\",\"nick\":\"\\u5361\\u5361\\u7f57\\u7279\\u00b7\\u56f8\"},{\"role_id\":\"31373443\",\"nick\":\"\\u4f60\\u6cd5\\u7237\"},{\"role_id\":\"31427057\",\"nick\":\"\\u65e0\\u6cd5\\u51b0\\u51bb\"},{\"role_id\":\"31506914\",\"nick\":\"\\u620f\\u8c82\\u8749\"},{\"role_id\":\"31627023\",\"nick\":\"\\u5730\\u72f1\\u00b7\\u53ec\\u5524\"},{\"role_id\":\"31935605\",\"nick\":\"[\\u5c0f\\u67d2]\"},{\"role_id\":\"32071049\",\"nick\":\"\\u9ea6\\u57ce\\u5173\\u7fbd\"},{\"role_id\":\"33685115\",\"nick\":\"\\u65e0\\u540d\\u7684\\u673a\\u68b0\\u5e08\"}],\"time\":\"1484805186\",\"msg\":\"success\"});";
            //int sta = aa.IndexOf("({") + 1;
            //string json = aa.Substring(sta, aa.IndexOf("});") - sta + 1);
            //userinfo = JsonConvert.DeserializeObject<DNFRoleInfo>(aa);
            userinfo = new DNFRoleInfo();
            _MJson m = new _MJson(aa);

            u_node = m.GetNode("data").toListnode();

            StringBuilder tmp = new StringBuilder();

            tmp.Append("dnf%257Cyes%257C" + userid + "%257C" + area + "%257C");

            foreach (var v in u_node.val)
            {
                comboBox1.Items.Add(v.GetNode("nick").toString());
                tmp.Append(v.GetNode("role_id").toString() + "*");
                //comboBox1.Items.Add(v.nick);
                //tmp.Append(v.role_id + "*");
            }
            if (comboBox1.Items.Count > 1)
            {
                comboBox1.SelectedIndex = 0;
                checkparam = tmp.ToString();
                //MessageBox.Show("获取角色成功");
            }
            else
            {
                MessageBox.Show("该区找不到角色,或者出现错误");
            }

            //MessageBox.Show(aa);
            //MessageBox.Show(cookieStr);
        }
Exemple #3
0
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cookieStr == "")
            {
                MessageBox.Show("请先登录!!!");
                return;
            }
            if (comboBox2.SelectedIndex < 0)
            {
                return;
            }
            if (comboBox3.SelectedIndex < 0)
            {
                return;
            }
            area = svlist[comboBox2.SelectedIndex].opt_data_array[comboBox3.SelectedIndex].v;
            string aa = http_GET("http://iyouxi.vip.qq.com/ams3.0.php?_c=queryRoleInfo&gamename=dnf&area=" + area + "&g_tk=" + gtk, myCookieContainer);

            //string aa = "json14848016790871({\"ret\":0,\"data\":[{\"role_id\":\"16705750\",\"nick\":\"Asura\\u4e36\\u4e44\"},{\"role_id\":\"17521661\",\"nick\":\"\\u9694\\u58c1[\\u738b\\u5927\\u67aa]\"},{\"role_id\":\"26980759\",\"nick\":\"\\u5929\\u9009\\u4e44\\u7f14\\u9020\"},{\"role_id\":\"28160539\",\"nick\":\"\\u6218\\u6597\\u5723\\u7075\"},{\"role_id\":\"28460688\",\"nick\":\"\\u529b\\u5c48\\u5929\\u4e0b\"},{\"role_id\":\"28549736\",\"nick\":\"\\u6613\\u6b66\\u8bed\"},{\"role_id\":\"28604163\",\"nick\":\"\\u4e73\\u6c41\\u306e\\u9a91\\u58eb\"},{\"role_id\":\"28894325\",\"nick\":\"\\u6c14\\u4e44\\u6b7b\\u4f60\"},{\"role_id\":\"29047949\",\"nick\":\"\\u8d64\\u4e36\\u72ac\"},{\"role_id\":\"29165134\",\"nick\":\"+38\\u7684[\\u51ef\\u4e3d]\"},{\"role_id\":\"29799370\",\"nick\":\"\\u540e\\u8857\\u516c\\u4e3b\"},{\"role_id\":\"30117053\",\"nick\":\"\\u5723\\u804c\\u8005\\u662f\\u6211\"},{\"role_id\":\"30117056\",\"nick\":\"\\u5723\\u804c\\u8005\\u771f\\u662f\\u6211\"},{\"role_id\":\"30119531\",\"nick\":\"\\u6211\\u771f\\u662f\\u5723\\u804c\\u8005\"},{\"role_id\":\"30166714\",\"nick\":\"\\u7b2c\\u4e94\\u5251\\u5723\\u00b7\\u7edd\"},{\"role_id\":\"30173360\",\"nick\":\"\\u4f26\\u5bb6\\u4e5f\\u80fd\\u5c04\"},{\"role_id\":\"30305005\",\"nick\":\"\\u9020\\u7891\\u8005\\u00b7\\u5239\"},{\"role_id\":\"30307230\",\"nick\":\"\\u6211\\u662f\\u9ed1\\u6b66\"},{\"role_id\":\"30436728\",\"nick\":\"\\u9b54\\u4e44\\u9053\"},{\"role_id\":\"30843469\",\"nick\":\"\\u72d7\\u6b87\\u786a\\u4f60\\u4e0d\\u914d\"},{\"role_id\":\"31209434\",\"nick\":\"\\u821e\\u6c14\\u5927\\u6e7f\"},{\"role_id\":\"31283367\",\"nick\":\"\\u5361\\u5361\\u7f57\\u7279\\u00b7\\u56f8\"},{\"role_id\":\"31373443\",\"nick\":\"\\u4f60\\u6cd5\\u7237\"},{\"role_id\":\"31427057\",\"nick\":\"\\u65e0\\u6cd5\\u51b0\\u51bb\"},{\"role_id\":\"31506914\",\"nick\":\"\\u620f\\u8c82\\u8749\"},{\"role_id\":\"31627023\",\"nick\":\"\\u5730\\u72f1\\u00b7\\u53ec\\u5524\"},{\"role_id\":\"31935605\",\"nick\":\"[\\u5c0f\\u67d2]\"},{\"role_id\":\"32071049\",\"nick\":\"\\u9ea6\\u57ce\\u5173\\u7fbd\"},{\"role_id\":\"33685115\",\"nick\":\"\\u65e0\\u540d\\u7684\\u673a\\u68b0\\u5e08\"}],\"time\":\"1484805186\",\"msg\":\"success\"});";
            //int sta = aa.IndexOf("({") + 1;
            //string json = aa.Substring(sta, aa.IndexOf("});") - sta + 1);
            //userinfo = JsonConvert.DeserializeObject<DNFRoleInfo>(aa);
            userinfo = new DNFRoleInfo();
            _MJson m = new _MJson(aa);

            try
            {
                u_node = m.GetNode("data").toListnode();
            }
            catch
            {
                MessageBox.Show("该区找不到角色!!!");
                return;
            }
            StringBuilder tmp = new StringBuilder();

            tmp.Append("dnf%257Cyes%257C" + userid + "%257C" + area + "%257C");
            comboBox1.Items.Clear();
            foreach (var v in u_node.val)
            {
                comboBox1.Items.Add(v.GetNode("nick").toString());
                tmp.Append(v.GetNode("role_id").toString() + "*");
                //comboBox1.Items.Add(v.nick);
                //tmp.Append(v.role_id + "*");
            }
            if (comboBox1.Items.Count > 0)
            {
                if (File.Exists(userid + ".ini"))
                {
                    string[] tmpstr = File.ReadAllLines(userid + ".ini");
                    comboBox1.SelectedIndex = int.Parse(tmpstr[2]);
                }
                else
                {
                    comboBox1.SelectedIndex = 0;
                }
                checkparam = tmp.ToString();
                //MessageBox.Show("获取角色成功");
            }
            else
            {
                MessageBox.Show("该区找不到角色,或者出现错误");
            }
            pictureBox1.Image = web.DowloadCheckImg("http://captcha.qq.com/getimage?aid=21000104", myCookieContainer);
            string query_role_result = web.SendDataByGET("http://apps.game.qq.com/comm-cgi-bin/content_admin/activity_center/query_role.cgi?game=dnf&area=" + area + "&sServiceDepartment=x6m5", "", ref myCookieContainer, "apps.game.qq.com", "http://dnf.qq.com/act/a20130805weixin/cdkey.htm?bg=per");

            if (query_role_result.IndexOf("msg:'ok'") > 0)
            {
                md5str = query_role_result.Substring(query_role_result.IndexOf("md5str:'") + 8, 32);
            }
            else
            {
                MessageBox.Show("获取角色加密信息失败,CDK可能无法正常兑换");
            }
        }