Beispiel #1
0
        public Dictionary <string, string> XinyueGetRYBinding()
        {
            try
            {
                string iActivityId = "54842";
                string iFlowId     = "280301";
                string posturl     = Properties.Resources.ameURL
                                     .Replace("{sSDID}", sSDIDList["http://apps.game.qq.com/comm-htdocs/js/ams/v0.2R02/act/49210/act.desc.js"])
                                     .Replace("{actid}", iActivityId)
                ;
                string postdata = Properties.Resources.ryzcPostdata
                                  .Replace("{ametk}", Value_Dictionary["{ametk}"])
                                  .Replace("{actid}", iActivityId)
                                  .Replace("{flowid}", iFlowId);
                string rseult = AmsSubmit(posturl, postdata);
                _MJson m      = new _MJson(rseult);
                Dictionary <string, string> binding = new Dictionary <string, string>();
                binding["roleId"]   = m.GetNode("FroleId").toString();
                binding["roleName"] = System.Web.HttpUtility.UrlDecode(m.GetNode("FroleName").toString());
                binding["areaName"] = m.GetNode("FareaName").toString();

                return(binding);
            }
            catch
            {
                return(null);
            }
        }
Beispiel #2
0
        private void loadnewini()
        {
            string str = DNFWebProxy.SendDataByGET("http://www.tx5d.com/api/v2/g.ashx", "");
            //string str = File.ReadAllText(Application.StartupPath + "\\atc.ini", System.Text.Encoding.GetEncoding("utf-8"));
            _MJson m = new _MJson(str);

            Lnode       = m.GetNode("Date").toListnode();
            label2.Text = m.GetNode("ver").toString();
            AD_webBrowser.Navigate(m.GetNode("adlink").toString());
            loadListnode(Lnode);
        }
Beispiel #3
0
        private void loadnewini()
        {
            string str = File.ReadAllText(Application.StartupPath + "\\atc.ini", System.Text.Encoding.GetEncoding("utf-8"));
            _MJson m   = new _MJson(str);

            atcid = new List <int>();
            Listnode Lnode = m.GetNode("Date").toListnode();

            label2.Text = m.GetNode("ver").toString();
            AD_webBrowser.Navigate(m.GetNode("adlink").toString());
            actnodeList   = new List <node>();
            actnodeList_C = new List <int>();
            loadListnode(Lnode);
        }
Beispiel #4
0
        private void loadonlineini()
        {
            string str = http_GET("http://www.tx5d.com/api/g.ashx", null);
            _MJson m   = new _MJson(str);

            atcid = new List <int>();
            Listnode Lnode = m.GetNode("Date").toListnode();

            label2.Text = m.GetNode("ver").toString();
            AD_webBrowser.Navigate(m.GetNode("adlink").toString());
            actnodeList   = new List <node>();
            actnodeList_C = new List <int>();
            loadListnode(Lnode);
        }
Beispiel #5
0
 public string CDKexchange(string CDK, string Code)
 {
     try
     {
         string result = SendDataByPost(Properties.Resources.DNFCDKURL,
                                        Properties.Resources.DNFCDKPost
                                        .Replace("{CDK}", CDK)
                                        .Replace("{Code}", Code)
                                        .Replace("{QQ}", QQ)
                                        .Replace("{g_tk}", Value_Dictionary["{gtk}"])
                                        .Replace("{area}", Value_Dictionary["{area}"])
                                        .Replace("{roleid}", Value_Dictionary["{roleid}"])
                                        .Replace("{md5str}", Value_Dictionary["{md5str}"])
                                        .Replace("{u2rolename}", Value_Dictionary["{u2rolename}"])
                                        .Replace("{ametk}", Value_Dictionary["{ametk}"])
                                        .Replace("{u2checkparam}", Value_Dictionary["{u2checkparam}"])
                                        , ref myCookieContainer);
         _MJson m = new _MJson(result);
         node   w = m.GetNode("modRet");
         w.Trim();
         return(w.GetNode("sMsg").toString());
     }
     catch
     {
         return("未知错误!!!");
     }
 }
Beispiel #6
0
        private void button6_Click(object sender, EventArgs e)
        {
            //string r = "{\"ret\":0,\"data\":{\"act\":{\"start_time\":1484582400,\"end_time\":1486310396,\"tlimit\":\"nolimit\",\"qqlimit_step\":\"d\",\"numlimit_step\":\"d\",\"op\":\"online_cdk\",\"qqlimit_num\":1,\"qqlimit_totalnum\":20,\"numlimit_num\":1,\"numlimit_per_num\":50000,\"numlimit_totalnum\":970000},\"join\":{\"time\":1484833645,\"level\":1,\"info\":\"ol|DTDLUAAAjGeGWxxw\",\"diamonds\":0},\"rule\":{\"rolexval\":\"5879\"},\"op\":{\"cdkey\":\"DTDLUAABHBDxRGYd\",\"cdkavailtime\":\"\",\"type\":\"1\",\"mid\":\"MA20170106164104022\"},\"hook\":{\"recordGift\":{\"actid\":160620,\"status\":0,\"type\":1,\"is_life_coupon\":\"0\",\"qqvipCardId\":0,\"time\":1484879153,\"name\":\"\\u5728\\u7ebf20\\u5206\\u949f\\u793c\\u5305\",\"level\":-1,\"info\":\"DTDLUAABHBDxRGYd\"}},\"actname\":\"\\u5728\\u7ebf20\\u5206\\u949f\\u793c\\u5305\",\"game\":\"Dnf\"},\"rettype\":0,\"time\":\"1484879153\",\"actid\":160620,\"msg\":\"success\"}";

            if (userid == "")
            {
                MessageBox.Show("请先登录!!!");
                return;
            }
            if (index < 0)
            {
                MessageBox.Show("请选择奖励再点击!!!");
                return;
            }
            if (atcid[index] == 0)
            {
                MessageBox.Show("当前选中项无奖励!!!");
                return;
            }

            string r = getgift(atcid[index], u_node.val[comboBox1.SelectedIndex].GetNode("role_id").toString(), area);
            _MJson m = new _MJson(r);

            //var a = JsonConvert.DeserializeObject<amsResponse>(r);
            if (m.GetNode("msg").toString() == "success")
            {
                if (m.GetNode("op").toString() == "online_cdk")
                {
                    textBox1.AppendText("\r\n======CDK=======\r\n" + m.GetNode("cdkey").toString() + "\r\n================\r\n");
                }
                textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ",领取【" + m.GetNode("actname").toString() + "】成功");
                if (!textBox1.Focused)
                {
                    textBox1.SelectionStart = textBox1.Text.Length;
                }
            }
            else
            {
                textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ",领取【" + m.GetNode("actname").toString() + "】失败,原因:" + m.GetNode("msg").toString() + "\r\n");
            }
        }
Beispiel #7
0
        public void XinyueRYtasksubmit(List <int> indexlist, string type, Action <string> AddText)
        {
            Dictionary <string, Dictionary <string, string> > task_list_ids = DNFHelper.GetTask_list_ids();
            string iActivityId = "54842";
            string iFlowId     = "";
            string posturl     = "";
            string postdata    = "";
            string rseult      = "";
            string msg         = "";

            foreach (var tmp in indexlist)
            {
                iFlowId = tasklist.val[tmp].GetNode("id").toString();
                switch (type)
                {
                case "0":
                {
                }
                break;

                case "1":
                case "2":
                {
                    iFlowId = task_list_ids[type][iFlowId];
                }
                break;
                }
                posturl = Properties.Resources.ameURL
                          .Replace("{sSDID}", sSDIDList["http://apps.game.qq.com/comm-htdocs/js/ams/v0.2R02/act/49210/act.desc.js"])
                          .Replace("{actid}", iActivityId);
                postdata = Properties.Resources.ryzcPostdata
                           .Replace("{ametk}", Value_Dictionary["{ametk}"])
                           .Replace("{actid}", iActivityId)
                           .Replace("{flowid}", iFlowId);
                rseult = AmsSubmit(posturl, postdata);
                _MJson m = new _MJson(rseult);
                if (m.GetNode("ret").toString() == "0")
                {
                    msg = "\r\n" + DateTime.Now.ToString() + ",成功完成任务【" + tasklist.val[tmp].GetNode("task_name").toString() + "】";
                }
                else
                {
                    msg = "\r\n" + DateTime.Now.ToString() + ",任务【" + tasklist.val[tmp].GetNode("task_name").toString() + "】失败,原因:" + m.GetNode("sMsg").toString();
                }
                AddText(msg);
            }



            //string rseult = AmsSubmit(posturl, postdata);
            //return Regex.Match(rseult, "(?<=\"sOutValue1\":\").*?(?=\")").Value;
        }
Beispiel #8
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);
        }
Beispiel #9
0
        private string getgift(node act, string roleid, string area)
        {
            string gifurl   = act.GetNode("subURL").toString().Replace("{g_tk}", gtk).Replace("{area}", area).Replace("{roleid}", roleid).Replace("{ametk}", ametk).Replace("{actid}", act.GetNode("actid").toString()).Replace("{flowid}", act.GetNode("flowid").toString());
            string postdata = act.GetNode("subDate").toString().Replace("{g_tk}", gtk).Replace("{area}", area).Replace("{roleid}", roleid).Replace("{ametk}", ametk).Replace("{actid}", act.GetNode("actid").toString()).Replace("{flowid}", act.GetNode("flowid").toString());

            //string aa = http_GET(gifurl, myCookieContainer);
            if (act.GetNode("model").toString() == "2")
            {
                string ext1 = act.GetNode("Ext1").toString();
                if (!sSDIDList.ContainsKey(ext1))
                {
                    string ams_actdesc = web.SendDataByGET(ext1, "", ref myCookieContainer, act.GetNode("Ext2").toString(), act.GetNode("Ext1").toString());
                    _MJson m           = new _MJson(ams_actdesc);
                    sSDIDList[ext1] = m.GetNode("sSDID").toString();
                }

                gifurl   = gifurl.Replace("{checkparam}", checkparam).Replace("{md5str}", md5str).Replace("{ametk}", ametk).Replace("{sSDID}", sSDIDList[ext1]);
                postdata = postdata.Replace("{checkparam}", checkparam).Replace("{md5str}", md5str).Replace("{ametk}", ametk).Replace("{sSDID}", sSDIDList[ext1]);
            }
            string au = "";

            if (act.GetNode("model").toString() == "3")
            {
                au       = act.GetNode("Ext3").toString();
                gifurl   = gifurl.Replace("{ametk}", ametk);
                postdata = postdata.Replace("{ametk}", ametk);
            }

            string aa = "";

            if (act.GetNode("subMethod").toString() == "Post")
            {
                aa = web.SendDataByPost(gifurl, postdata, ref myCookieContainer, act.GetNode("Host").toString(), act.GetNode("Referer").toString(), au);
            }
            else
            {
                aa = web.SendDataByGET(gifurl, postdata, ref myCookieContainer, act.GetNode("Host").toString(), act.GetNode("Referer").toString(), au);
            }
            //var a = JsonConvert.DeserializeObject<smsg>(aa);

            //MessageBox.Show(gifurl);
            return(aa);
        }
Beispiel #10
0
        private void button3_Click(object sender, EventArgs e)
        {
            //string aaaa = web.SendDataByGET("http://dnf.qq.com/act/a20130805weixin/cdkey.htm?bg=pe", "", ref myCookieContainer);
            string a = CDKexchange(textBox2.Text, textBox3.Text, u_node.val[comboBox1.SelectedIndex].GetNode("role_id").toString(), area);
            _MJson m = new _MJson(a);

            if (checkBox1.Checked == true)
            {
                Thread t = new Thread(getvcode);
                t.Start();
            }
            else
            {
                pictureBox1.Image = web.DowloadCheckImg("http://captcha.qq.com/getimage?aid=21000104", myCookieContainer);
            }
            node w = m.GetNode("modRet");

            w.Trim();
            MessageBox.Show(w.GetNode("sMsg").toString());
        }
Beispiel #11
0
        public Dictionary <string, int> XinyueGetRYProp()
        {
            string iActivityId = "54842";
            string iFlowId     = "280741";
            string posturl     = Properties.Resources.ameURL
                                 .Replace("{sSDID}", sSDIDList["http://apps.game.qq.com/comm-htdocs/js/ams/v0.2R02/act/49210/act.desc.js"])
                                 .Replace("{actid}", iActivityId)
            ;
            string postdata = Properties.Resources.ryzcPostdata
                              .Replace("{ametk}", Value_Dictionary["{ametk}"])
                              .Replace("{actid}", iActivityId)
                              .Replace("{flowid}", iFlowId);
            string rseult = AmsSubmit(posturl, postdata);
            _MJson m      = new _MJson(rseult);
            Dictionary <string, int> card = new Dictionary <string, int>();

            card["two_score"] = m.GetNode("sOutValue1").toInt() - m.GetNode("sOutValue5").toInt();
            card["free_do"]   = m.GetNode("sOutValue3").toInt() - m.GetNode("sOutValue4").toInt();
            card["rd_do"]     = m.GetNode("sOutValue6").toInt() - m.GetNode("sOutValue7").toInt();
            return(card);
        }
Beispiel #12
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (userid == "")
            {
                MessageBox.Show("请先登录!!!");
                return;
            }
            if (comboBox2.SelectedIndex < 0)
            {
                MessageBox.Show("请选择大区!!!");
                return;
            }
            if (comboBox3.SelectedIndex < 0)
            {
                MessageBox.Show("请选择角色!!!");
                return;
            }
            AD_webBrowser.Visible = false;
            string r = "";
            _MJson m;
            int    i = 0;

            foreach (int id in atcid)
            {
                if (id == 0)
                {
                    i++; continue;
                }

                r = getgift(actnodeList[i], u_node.val[comboBox1.SelectedIndex].GetNode("role_id").toString(), area);

                m = new _MJson(r);

                if (actnodeList[i].GetNode("model").toString() == "2")
                {
                    if (m.GetNode("modRet") == null)
                    {
                        textBox1.AppendText("\r\n" + DateTime.Now.ToString() + "领取失败:" + m.GetNode("sMsg").toString() + "\r\n");
                    }
                    else
                    {
                        textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ":" + m.GetNode("modRet").GetNode("sMsg").toString() + "\r\n");
                    }
                }

                else
                if (m.GetNode("msg").toString() == "success")
                {
                    if (m.GetNode("op").toString() == "online_cdk")
                    {
                        textBox1.AppendText("\r\n======CDK=======\r\n" + m.GetNode("cdkey").toString() + "\r\n================\r\n");
                    }
                    textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ",领取【" + m.GetNode("actname").toString() + "】成功");
                    if (!textBox1.Focused)
                    {
                        textBox1.SelectionStart = textBox1.Text.Length;
                    }
                }
                else
                {
                    textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ",领取【" + m.GetNode("actname").toString() + "】失败,原因:" + m.GetNode("msg").toString() + "\r\n");
                }

                i++;
            }
        }
Beispiel #13
0
        private string GetGift(node act)
        {
            string gifurl = act.GetNode("subURL").toString()
                            .Replace("{g_tk}", Value_Dictionary["{gtk}"])
                            .Replace("{area}", Value_Dictionary["{area}"])
                            .Replace("{roleid}", Value_Dictionary["{roleid}"])
                            .Replace("{ametk}", Value_Dictionary["{ametk}"])
                            .Replace("{skey}", Value_Dictionary["{skey}"])
                            .Replace("{actid}", act.GetNode("actid").toString())
                            .Replace("{flowid}", act.GetNode("flowid").toString());
            string postdata = act.GetNode("subDate").toString()
                              .Replace("{g_tk}", Value_Dictionary["{gtk}"])
                              .Replace("{area}", Value_Dictionary["{area}"])
                              .Replace("{roleid}", Value_Dictionary["{roleid}"])
                              .Replace("{ametk}", Value_Dictionary["{ametk}"])
                              .Replace("{skey}", Value_Dictionary["{skey}"])
                              .Replace("{actid}", act.GetNode("actid").toString())
                              .Replace("{flowid}", act.GetNode("flowid").toString());
            string au         = "";
            string Host       = act.GetNode("Host").toString();
            string Referer    = act.GetNode("Referer").toString();
            string addcookies = "";

            switch (act.GetNode("model").toString())
            {
            case "1": {
                au = act.GetNode("Ext1").toString();
                ;
            } break;

            case "2":
            {
                string ext1 = act.GetNode("Ext1").toString();
                if (!sSDIDList.ContainsKey(ext1))
                {
                    string ams_actdesc = SendDataByGET(ext1, "", ref myCookieContainer, act.GetNode("Ext2").toString(), act.GetNode("Ext3").toString());
                    _MJson m           = new _MJson(ams_actdesc);
                    sSDIDList[ext1] = m.GetNode("sSDID").toString();
                }
                gifurl   = gifurl.Replace("{checkparam}", Value_Dictionary["{u2checkparam}"]).Replace("{md5str}", Value_Dictionary["{md5str}"]).Replace("{ametk}", Value_Dictionary["{ametk}"]).Replace("{sSDID}", sSDIDList[ext1]);
                postdata = postdata.Replace("{checkparam}", Value_Dictionary["{u2checkparam}"]).Replace("{md5str}", Value_Dictionary["{md5str}"]).Replace("{ametk}", Value_Dictionary["{ametk}"]).Replace("{sSDID}", sSDIDList[ext1]);
            } break;

            case "3":
            {
                au = act.GetNode("Ext3").toString();
            } break;

            case "4":
            {
                //addcookies =  System.Web.HttpUtility.UrlDecode(act.GetNode("Ext3").toString())
                //            .Replace("{g_tk}", Value_Dictionary["{gtk}"])
                //            .Replace("{area}", Value_Dictionary["{area}"])
                //            .Replace("{roleid}", Value_Dictionary["{roleid}"])
                //            .Replace("{ametk}", Value_Dictionary["{ametk}"])
                //            .Replace("{checkparam}", Value_Dictionary["{checkparam}"])
                //            .Replace("{u1rolename}", Value_Dictionary["{u1rolename}"])
                //            .Replace("{u1areaname}", Value_Dictionary["{u1areaname}"])
                //            .Replace("{skey}", Value_Dictionary["{skey}"])
                //            .Replace("{actid}", act.GetNode("actid").toString())
                //            .Replace("{flowid}", act.GetNode("flowid").toString());
                gifurl = gifurl.Replace("{u1rolename}", Value_Dictionary["{u1rolename}"])
                         .Replace("{QQ}", QQ)
                         .Replace("{u1areaname}", Value_Dictionary["{u1areaname}"]);
                ;
            } break;
            }

            string result = "";

            if (act.GetNode("subMethod").toString().ToLower() == "post")
            {
                result = SendDataByPost(gifurl, postdata, ref myCookieContainer, Host, Referer, au, addcookies);
            }
            else
            {
                result = SendDataByGET(gifurl, postdata, ref myCookieContainer, Host, Referer, au, addcookies);
            }
            return(result);
        }
Beispiel #14
0
        //心悦专区================

        public void ryzcsSDID()
        {
            string ams_actdesc = SendDataByGET("http://apps.game.qq.com/comm-htdocs/js/ams/v0.2R02/act/49210/act.desc.js", "", ref myCookieContainer, "apps.game.qq.com", "http://xinyue.qq.com/act/pc/a20160623dnfryzc/index.shtml");
            _MJson m           = new _MJson(ams_actdesc);

            sSDIDList["http://apps.game.qq.com/comm-htdocs/js/ams/v0.2R02/act/49210/act.desc.js"] = m.GetNode("sSDID").toString();
        }
Beispiel #15
0
        private void button7_Click(object sender, EventArgs e)
        {
            if (userid == "")
            {
                MessageBox.Show("请先登录!!!");
                return;
            }
            if (index < 0)
            {
                MessageBox.Show("请选择奖励再点击!!!");
                return;
            }
            if (atcid[index] == 0)
            {
                MessageBox.Show("当前选中项无奖励!!!");
                return;
            }
            if (comboBox2.SelectedIndex < 0)
            {
                MessageBox.Show("请选择大区!!!");
                return;
            }
            if (comboBox3.SelectedIndex < 0)
            {
                MessageBox.Show("请选择角色!!!");
                return;
            }
            AD_webBrowser.Visible = false;

            string r = getgift(actnodeList[index], u_node.val[comboBox1.SelectedIndex].GetNode("role_id").toString(), area);

            _MJson m = new _MJson(r);

            if (actnodeList[index].GetNode("model").toString() == "2" || actnodeList[index].GetNode("model").toString() == "3")
            {
                if (m.GetNode("modRet") == null)
                {
                    textBox1.AppendText("\r\n" + DateTime.Now.ToString() + "领取失败:" + m.GetNode("sMsg").toString() + "\r\n");
                }
                else
                {
                    textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ":" + m.GetNode("modRet").GetNode("sMsg").toString() + "\r\n");
                }
            }

            else
            if (m.GetNode("msg").toString() == "success")
            {
                if (m.GetNode("op").toString() == "online_cdk")
                {
                    textBox1.AppendText("\r\n======CDK=======\r\n" + m.GetNode("cdkey").toString() + "\r\n================\r\n");
                }
                textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ",领取【" + m.GetNode("actname").toString() + "】成功");
                if (!textBox1.Focused)
                {
                    textBox1.SelectionStart = textBox1.Text.Length;
                }
            }
            else
            {
                textBox1.AppendText("\r\n" + DateTime.Now.ToString() + ",领取【" + m.GetNode("actname").toString() + "】失败,原因:" + m.GetNode("msg").toString() + "\r\n");
            }


            //string ams_actdesc = web.SendDataByGET("http://amp.guanjia.qq.com/comm-htdocs/js/ams/v0.2R02/act/107853/act.desc.js", "", ref myCookieContainer, "amp.guanjia.qq.com", "http://amp.guanjia.qq.com/act/brand/201703dnf/index.html");
            //_MJson m = new _MJson(ams_actdesc);
            //sSDID = m.GetNode("sSDID").toString();
            //string aa = web.SendDataByPost("http://apps.game.qq.com/ams/ame/ame.php?ameVersion=0.3&sServiceType=ampguanjia&iActivityId=107853&sServiceDepartment=group_7&set_info=group_7&sSDID=" + sSDID + "&isXhrPost=true", "gameId=&sArea=&iSex=&sRoleId=&iGender=&sServiceType=ampguanjia&objCustomMsg=&areaname=&roleid=&rolelevel=&rolename=&areaid=&iActivityId=107853&iFlowId=352167&g_tk=" + ametk + "&e_code=0&g_code=0&eas_url=http%253A%252F%252Famp.guanjia.qq.com%252Fact%252Fbrand%252F201703dnf%252F&eas_refer=&xhr=1&sServiceDepartment=group_7&xhrPostKey=xhr_1490862711364", ref myCookieContainer);
            //MessageBox.Show(new _MJson(aa).GetNode("msg").toString());
        }
Beispiel #16
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可能无法正常兑换");
            }
        }
Beispiel #17
0
        private string Analysis(node obj, string rl)
        {
            StringBuilder result = new StringBuilder();
            _MJson        m      = new _MJson(rl);

            try
            {
                switch (obj.GetNode("model").toString())
                {
                case "1":
                {
                    if (m.GetNode("msg").toString() == "success")
                    {
                        string op = m.GetNode("op").toString();
                        switch (op)
                        {
                        case "online_cdk": { result.Append("\r\n======CDK=======\r\n" + m.GetNode("cdkey").toString() + "\r\n================"); }; break;

                        case "add_money": { result.Append("\r\n======num=======\r\n" + m.GetNode("num").toString() + "\r\n================"); }; break;

                        case "lottery_route_must": { result.Append("\r\n======抽奖=======\r\n" + m.GetNode("cdkey").toString() + "\r\n" + m.GetNode("name").toString() + "\r\n================"); }; break;

                        case "view_money": { result.Append("\r\n======money=======\r\n" + m.GetNode("data").GetNode("op", true).toString() + "\r\n================"); }; break;

                        case "query_gift_list":
                        {
                            result.Append("\r\n======礼物列表=======\r\n");
                            Listnode oplist = m.GetNode("data").GetNode("op", true).toListnode();
                            oplist.val.ForEach(t => {
                                        result.AppendFormat("\r\n|->{0}<-|{1}│{2}│\r\n", t.GetNode("info").toString(), t.GetNode("name").toString(), GetTime(t.GetNode("time").toString()).ToString());
                                    });
                            result.Append("\r\n=====================\r\n");
                        }; break;
                            //case "": { }; break;
                            //case "": { }; break;
                            //case "": { }; break;
                            //case "": { }; break;
                        }

                        //if (m.GetNode("op").toString() == "online_cdk")
                        //    result.Append("\r\n======CDK=======\r\n" + m.GetNode("cdkey").toString() + "\r\n================");
                        result.Append("\r\n" + DateTime.Now.ToString() + ",XXOO【" + m.GetNode("actname").toString() + "】成功");
                    }
                    else
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + ",XXOO【" + m.GetNode("actname").toString() + "】失败,原因:" + m.GetNode("msg").toString());
                    }
                }
                break;

                case "2":
                {
                    if (m.GetNode("modRet") == null)
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + "领取失败:" + m.GetNode("sMsg").toString());
                    }
                    else
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + ":" + m.GetNode("modRet").GetNode("sMsg").toString());
                    }
                }
                break;

                case "3":
                {
                    if (m.GetNode("modRet") == null)
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + "领取失败:" + m.GetNode("sMsg").toString());
                    }
                    else
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + ":" + m.GetNode("modRet").GetNode("sMsg").toString());
                    }
                }
                break;

                case "4":
                {
                    if (m.GetNode("code").toString() != "0")
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + "领取失败:" + m.GetNode("msg").toString());
                    }
                    else
                    {
                        result.Append("\r\n" + DateTime.Now.ToString() + ": 成功,领取到" + m.GetNode("gift_name").toString());
                    }
                }
                break;
                }


                if (obj.GetNode("model").toString() == "2")
                {
                }
                else
                {
                }
            }
            catch
            {
                result.Append("\r\n" + DateTime.Now.ToString() + ",出现未知错误!!!");
            }

            return(result.ToString());
        }