吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 4374|回复: 4
收起左侧

[会员申请] 申请会员ID:jacklp【申请通过】

  [复制链接]
吾爱游客  发表于 2015-2-26 14:44
1、申 请 I D :jacklp
2、个人邮箱:jacklp1@qq.com
3、原创技术文章: 偶然发现草榴在发码 立即写了一个抢码软件  ,并能自动注册;为了抓紧时间 功能简单;由于已经抢到3个,所以,功能也就没去完善
QQ截图20150226143551.png
[C#] 纯文本查看 复制代码
 public partial class Form1 : Form
    {
        public Form1()
        {

            InitializeComponent();
            webBrowser1.Navigate("http://ruai.lesile.net/register.php");
        }
        /// <summary>
        /// 获取编码格式
        /// </summary>
        /// <param name="response"></param>
        /// <returns></returns>
        public Encoding GetEncoding(HttpWebResponse response)
        {
            Encoding code = Encoding.Default;
            string charset = null;
            //如果发现content-type头   
            string ctypeLower = response.Headers["content-type"];
            string ctypeOrder = response.Headers["Content-Type"];
            string ctype = "";
            if (!ctypeLower.Equals(""))
                ctype = ctypeLower;
            if (!ctypeOrder.Equals(""))
                ctype = ctypeOrder;
            //Console.WriteLine("ctype:" + ctype);
            if (ctype != null)
            {
                int ind = ctype.IndexOf("charset=");
                if (ind != -1)
                {
                    charset = ctype.ToLower().Substring(ind + 8);
                }
            }
            Console.WriteLine("charset编码格式:" + charset);
            if (charset != "")
            {
                try
                {
                    code = Encoding.GetEncoding(charset);
                }
                catch { }
            }
            return code;
        }
        /// <summary>
        /// GET URL
        /// </summary>
        /// <param name="Url"></param>
        /// <returns></returns>
        private string GetWebContent(string Url)
        {
        start:
            try
            {
                string strResult = "";
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
                //声明一个HttpWebRequest请求 
                request.Timeout = 10000;
                //设置连接超时时间 
                request.Headers.Set("Pragma", "no-cache");
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                Stream streamReceive = response.GetResponseStream();
                Encoding encoding = GetEncoding(response);//  取得要取得的网页的编码方式
                //Encoding encoding = Encoding.GetEncoding("utf-8");
                StreamReader streamReader = new StreamReader(streamReceive, encoding);
                strResult = streamReader.ReadToEnd();
                return strResult;
            }
            catch
            {
                goto start;
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }
        public string strWeb;
        private static string Url = "http://ruai.lesile.net/htm_data/7/1410/1257255.html";
        string str = "";
        private string strWebContent;
        private int iLastStart;
        private int iStart;
        private int iEnd;
        private void reCAOLIU()
        {
        REtry:
            try
            {
                //得到指定Url的源码 
                strWebContent = GetWebContent(Url);
                //webBrowser2.DocumentText = strWebContent;
                iLastStart = strWebContent.IndexOf("第五批", 0);
                if (iLastStart == -1)
                {
                    return;
                }//获取邀请码
                iStart = strWebContent.IndexOf("<br>", iLastStart + 50);
                iEnd = strWebContent.IndexOf("<br>", iStart + 6);
                strWeb = strWebContent.Substring(iStart + 4, iEnd - iStart - 4);
                textBox2.Text = strWeb;

                label1.Text = DateTime.Now.TimeOfDay.ToString();
                timer1.Enabled = false;
                HtmlElement regname = webBrowser1.Document.GetElementById("regname");
                HtmlElement regpwd = webBrowser1.Document.GetElementById("regpwd");
                HtmlElement regpwdrepeat = webBrowser1.Document.GetElementById("regpwdrepeat");
                HtmlElement regemail = webBrowser1.Document.GetElementById("regemail");
                HtmlElement invcode = webBrowser1.Document.GetElementById("invcode");
                //自动填写注册信息
                regname.InnerText = "jacklp";
                regpwd.InnerText = "123456";
                regpwdrepeat.InnerText = "123456";
                regemail.InnerText = "jacklp1@qq.com";
                invcode.InnerText = strWeb;
                HtmlElement submit = webBrowser1.Document.GetElementById("regsubmit");//提交注册
                submit.InvokeMember("click");
            }
            catch
            {
                goto REtry;
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            reCAOLIU();

        }
 

    }

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

Hmily 发表于 2015-2-27 16:20
ID:jacklp
邮箱:jacklp1@qq.com

申请通过,欢迎光临吾爱破解论坛,期待吾爱破解有你更加精彩,ID和密码自己通过邮件密码找回功能修改,请即时登陆并修改密码!
登陆后请在一周内在此帖报道,否则将删除ID信息。
jacklp 发表于 2015-2-28 16:45
一腾 发表于 2015-2-28 16:47
禁惹尘埃 发表于 2015-2-28 17:22 来自手机
1024貌似很牛逼的样子,我也想去试试
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-29 06:58

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表