`
李科笠
  • 浏览: 62723 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

湖北校园E信宽带时长一键查询工具

阅读更多


湖北校园普通E信每个月上网时间是有限制的,240小时。

查询使用时长需要到指定网页查询。

我写成了一个客户端的小工具,可以自动抓取认证码,填写手机号码,即可由短信获取上网时长。

 

 

 


 

 




贴上源码:

/// <summary>
        /// 查询宽带剩余时间
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {

            //获取手机号码
            webBrowser1.Document.GetElementById("Tel").InnerText = this.tb_phone.Text.ToString().Trim();

            //自动填写验证码
            webBrowser1.Document.GetElementById("txtCheckNum").InnerText = webBrowser1.Document.GetElementById("labelCheckNum").InnerText;
            this.tb_yanzheng.Text = webBrowser1.Document.GetElementById("labelCheckNum").InnerText;

            //判断是否页面已经加载完成
            if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
            {
                //加载完毕后点击确定按钮
                webBrowser1.Document.GetElementById("btnSend").InvokeMember("click");
                //MessageBox.Show("测试 - success", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            this.timer1.Enabled = true;

        }


        private void timer1_Tick(object sender, EventArgs e)
        {
            if (this.timer1.Interval != 0)
            {
                this.timer1.Enabled = false;
                MessageBox.Show(webBrowser1.Document.GetElementById("ErrorLab").InnerText, "消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.label11.Visible = false;
                if (webBrowser1.Document.GetElementById("ErrorLab").InnerText == "您的操作太频繁,重复查询请稍等5分钟")
                {
                    this.l_showInfo.Visible = true;
                }
                this.timer1.Enabled = false;
            }
        }

        /// <summary>
        /// 关闭按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click_1(object sender, EventArgs e)
        {
             if (MessageBox.Show("魔殇小工具,若您发现BUG请发邮件给我,我将尽快修正,感谢!", "消息", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
            {
                this.Dispose();
                Application.Exit();
            }
        }

软件已经全部写完,部分未知BUG希望各位使用之后将BUG信息发给我,我会尽快修补上。

点击下载

  • 大小: 17.4 KB
  • 大小: 47.2 KB
  • 大小: 46.2 KB
  • 大小: 45.1 KB
1
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics