Пример #1
0
        private void insertt(object sender, EventArgs e)
        {
            ListViewItem listView = new ListViewItem();
            GetText      text     = new GetText();
            Eleme        eleme    = new Eleme();
            string       data     = System.Web.HttpUtility.UrlDecode(cookie.Text, System.Text.Encoding.UTF8) + ";";
            int          ID       = listView1.Items.Count + 1;
            string       openid   = text.TextMiddle(data, "\"openid\":\"", "\",", 0);
            string       sign     = text.TextMiddle(data, "\"eleme_key\":\"", "\",", 0);
            string       SID      = text.TextMiddle(data, "SID=", ";", 0);

            if (eleme.E_Add(openid, sign, SID) == 0)
            {
                MessageBox.Show("小号没有绑定手机号或者cookie不完整!");
            }
            else
            {
                ID            = listView1.Items.Count + 1;
                listView.Text = ID.ToString();
                listView.SubItems.Add(openid);
                listView.SubItems.Add(sign);
                listView.SubItems.Add(SID);
                listView1.Items.Add(listView);
                MessageBox.Show("添加成功!");
            }
        }
Пример #2
0
            public int Packets_number(string sn)
            {
                int    number;
                string data = base.HttpGet(eleme_url + sn, "");

                data = text.TextMiddle(data, "\"lucky_number\": ", ", \"", 0);

                int.TryParse(data, out number);
                return(number);
            }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Eleme   eleme   = new Eleme();
            GetText text    = new GetText();
            int     number  = 0;
            int     number2 = 0;
            string  sn      = text.TextMiddle(Packets.Text, "sn=", "&theme_id", 0);

            if (sn == "")
            {
                MessageBox.Show("红包连接错误,请重新输入!");
            }
            else
            {
                int Packets_number = eleme.Packets_number(sn) - 1;
                if (listView1.Items.Count < Packets_number)
                {
                    MessageBox.Show("小号数量不足,请您添加!");
                }
                else
                {
                    for (int i = 0; i < listView1.Items.Count; i++)
                    {
                        string openid = listView1.Items[i].SubItems[1].Text;
                        string sign   = listView1.Items[i].SubItems[2].Text;
                        string SID    = listView1.Items[i].SubItems[3].Text;
                        number = eleme.Packets_Receive(openid, sign, SID, sn);
                        if (number > number2)
                        {
                            number2 = number;
                        }
                        if (number2 == Packets_number)
                        {
                            MessageBox.Show("当前红包总数量为" + Packets_number + 1 + "已领取数量" + number2 + "请您手动领取最大手气红包");
                            break;
                        }
                        if (number2 > Packets_number)
                        {
                            MessageBox.Show("最大手气已经被领取");
                            break;
                        }

                        if (i + 1 == listView1.Items.Count)
                        {
                            MessageBox.Show("当前红包总数量为" + Packets_number + 1 + "已领取数量" + number2);
                        }
                    }
                }
            }
        }
Пример #4
0
        ///   <summary>
        ///   获取验证码基本配置
        ///   </summary>
        ///  <param name="qq">QQ号</param>
        ///   <param name="cap_cd">cap_cd</param>
        ///   <param name="sid">sid</param>
        ///  <param name="sess">sess</param>
        /// <returns>逻辑型</returns>
        public bool GetSliderInfo(string qq, string cap_cd, ref string sid, ref string sess)
        {
            string callback, data, url, temp = string.Empty;
            Json   json = new Json();

            callback = "_aq_" + GetText.GetRandom(111111, 999999);
            url      = "https://ssl.captcha.qq.com/cap_union_prehandle?aid=" + Resources.aid + "&captype=&protocol=https&clientype=1&disturblevel=&apptype=2&noheader=0&color=&showtype=&fb=1&theme=&lang=2052&ua=" + Resources.ua + "&cap_cd=" + cap_cd + "&uid=" + qq + "&callback=" + callback + "&sess=&subsid=1";
            data     = WEB.GetWebData(url, ref temp, ref temp, ref temp);
            data     = GetText.TextMiddle(data, callback + "(", ")", 0);
            json.Analysis(data);
            sid  = json.Getvalue("sid");
            sess = json.Getvalue("sess");
            if (sid == "" || sess == "")
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Пример #5
0
        ///   <summary>
        ///   是否需要验证码
        ///   </summary>
        ///  <param name="qq">QQ号</param>
        ///   <param name="cap_cd">cap_cd</param>
        ///   <param name="code">code</param>
        ///  <param name="verify">verify</param>
        /// <returns>逻辑型</returns>
        public bool Is_Code(string qq, ref string cap_cd, ref string code, ref string verify)
        {
            string url  = "https://ssl.ptlogin2.qq.com/check?pt_tea=2&uin=" + qq + "&appid=" + Resources.aid + "&ptlang=2052&regmaster=&pt_uistyle=9&r=" + GetText.GenerateTimeStamp() + "&pt_jstoken=1468653375";
            string temp = string.Empty;

            temp = WEB.GetWebData(url, ref temp, ref temp, ref temp);

            string [] data = GetText.TextMiddle(temp, "ptui_checkVC(", ")", 0).Replace("'", "").Split(',');
            if (data[0] == "0")
            {
                code   = data[1];
                verify = data[3];
                return(false);
            }
            else if (data[0] == "1")
            {
                cap_cd = data[1];
                return(true);
            }
            else
            {
                return(false);
            }
        }